FireSharp icon indicating copy to clipboard operation
FireSharp copied to clipboard

listen OnAsync data of specific path

Open ahmadsety opened this issue 9 years ago • 0 comments

this code does not fire onAdded event , noChange event and removed

IFirebaseConfig config = new FirebaseConfig { AuthSecret = AuthSecret, BasePath = databaseURL }; IFirebaseClient _client = new FirebaseClient(config);

            List<VideoInformation> result = new List<VideoInformation>();

            await _client.OnAsync("uploadQueue",
                //added
                (sender, args, context) =>
                {
                    result = JsonConvert.DeserializeObject<List<VideoInformation>>(args.Data);
                },
                //changed
                (sender, args, context) =>
                {
                    result = JsonConvert.DeserializeObject<List<VideoInformation>>(args.Data);
                },
                // removed
                (sender, args, context) =>
                {
                    Console.WriteLine(args.ToJson());
                });

ahmadsety avatar Dec 07 '16 12:12 ahmadsety