DeepStreamRecords - expose RecordUpdated, RecordPatched events
Hi, I am after an event when a whole record is changed from deepstream. The PropertyChanged is a bit to granular for my need as I only want one event each time you receive updates from deepstream for a record. I am happy to do the pull request.
What kind of data you want to see in the event args of such events?
Feel free to propose a PR for this.
I want to know when a record is updated from deepstream. RecordName and maybey the record. There are events on the connection class but they are internal.
Currently if I subscribe to the INotifyPropertyChange I get an event for every property that changed in a record when I only want 1 event.
I understand. So I propose an API like this:
client.Records.RecordPatched += (s, e) => { var record = e.Record; var path = e.Path; };
client.Records.RecordUpdated += (s, e) => { var record = e.Record; };
The Record member in EventArgs should be from type IDeepStreamRecord.
If you need the name you can get it via e.Record.RecordName
I'm waiting for your PR :smile:
yes that is fine, similar to the https://deepstreamhub.com/docs/client-java/RecordChangedCallback/
The path changed event would be handled by the existing property change event https://deepstreamhub.com/docs/client-java/RecordPathChangedCallback/