deepstreamNet icon indicating copy to clipboard operation
deepstreamNet copied to clipboard

Subscribing to record updates/changes

Open oriash93 opened this issue 6 years ago • 5 comments

I have noticed that there is no subscribe method for record updates in the DeepStreamRecord class. I want to know if there is another way to subscribe to a change on a record.

oriash93 avatar May 31 '18 08:05 oriash93

DeepStreamRecord class implements INotifyPropertyChanged interface. So you can subscribe on the PropertyChanged event to get notified about updates/changes in a record.

schulz3000 avatar May 31 '18 10:05 schulz3000

With this event you get notified only when there is a chagne in a record in client side. How do I know if the record changes from the server side? You can subscribe to events but not for recrods.

TheRe4lOne avatar May 31 '18 17:05 TheRe4lOne

If you get the record via GetRecordAsync then the PropertyChanged event is connected in the background with the server and will be triggered on server side changes of the record

schulz3000 avatar Jun 01 '18 18:06 schulz3000

I tested it and it looks like it works. Thanks.

TheRe4lOne avatar Jun 05 '18 06:06 TheRe4lOne

Originally I wanted an event that notifies when changes are made to the record, and provides the record itself. @schulz3000 take a look at the PR, please :)

oriash93 avatar Jan 29 '19 15:01 oriash93