schulz3000 / deepstreamNet

dotnet Client for deepstream.io
MIT License
38 stars 9 forks source link

Subscribing to record updates/changes #36

Open oriash93 opened 6 years ago

oriash93 commented 6 years ago

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.

schulz3000 commented 6 years ago

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

TheRe4lOne commented 6 years ago

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.

schulz3000 commented 6 years ago

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

TheRe4lOne commented 6 years ago

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

oriash93 commented 5 years ago

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 :)