step-up-labs / firebase-database-dotnet

C# library for Firebase Realtime Database.
MIT License
668 stars 168 forks source link

AsObserveable is not working as expected #312

Open tradingproject19 opened 1 year ago

tradingproject19 commented 1 year ago

Attached image is the schema of one my databases.

image

I am using following to get realtime updates.

var d = client.Child("A")
                .OrderByKey()
                .AsObservable<Ticker>()
                .Subscribe(d => 
                {
                    Debug.WriteLine(JsonConvert.SerializeObject(d));
                });

The problem is whenever any key changes I only get that key. I want to receive an entire set. it's working on nodejs library. So whenever anything changes inside A, I should get all the keys and their values from C to V.

Is it possible?

tradingproject19 commented 1 year ago

Any change in the node should return the entire node.

tampo80 commented 7 months ago

you should use d.Object to achieve this