bugthesystem / FireSharp

An asynchronous cross-platform .Net library for Firebase
The Unlicense
697 stars 147 forks source link

Can't stream data from database #116

Open RameezStark opened 6 years ago

RameezStark commented 6 years ago

Hi, I am unable to use this api for streaming data to my c# winform application. It's showing that the valuehandler cannot take 2 arguments.

EventStreamResponse response = await _client.OnAsync("chat", **_(sender, args) => {
       System.Console.WriteLine(args.Data);_**
});

//Call dispose to stop listening for events
response.Dispose();

I tried to use this code, NOT WORKING.

Does anyone know why?

Ishmael-Moreno commented 6 years ago

@RameezStark you ever figured out why this error shows?

Ishmael-Moreno commented 6 years ago

@RameezStark So apparently in the latest version of Firesharp it takes 3 arguments and not 2: The correct use is EventStreamResponse response = await client.OnAsync("chat", (s, args,context) => { System.Console.WriteLine(args.Data); });

RameezStark commented 6 years ago

Sorry, dropped the project. Working on another one now.

On Sat 4 Aug, 2018, 12:47 PM Ishmael-Moreno, notifications@github.com wrote:

@RameezStark https://github.com/RameezStark you ever figured out why this error shows?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ziyasal/FireSharp/issues/116#issuecomment-410430098, or mute the thread https://github.com/notifications/unsubscribe-auth/AlrpN_1xY0O0iZSO5Jym6fZWK-VG9_P9ks5uNUqMgaJpZM4UroY8 .