Skip to content

Commit

Permalink
Move listen methods out of Client and into MQTT class
Browse files Browse the repository at this point in the history
  • Loading branch information
gave92 committed Feb 9, 2020
1 parent 331a86e commit 3c523a9
Show file tree
Hide file tree
Showing 12 changed files with 369 additions and 1,082 deletions.
2 changes: 1 addition & 1 deletion examples/netcore/Basic_Usage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ await client.sendLocalFiles(
Console.WriteLine("Listening... Press Ctrl+C to exit.");
Console.CancelKeyPress += new ConsoleCancelEventHandler((s, e) => { e.Cancel = true; _closing.Set(); });
_closing.WaitOne();
client.StopListening();
await client.StopListening();

// Logging out is not required
// await client.DoLogout();
Expand Down
2 changes: 1 addition & 1 deletion examples/netcore/FBClient_Cookies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private async Task<string> get2FACode()
return Console.ReadLine();
}

protected override async Task onEvent(FB_Event ev)
protected override async Task OnEvent(FB_Event ev)
{
switch (ev)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/netcore/FBClient_Simple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private async Task<string> get2FACode()
return Console.ReadLine();
}

protected override async Task onEvent(FB_Event ev)
protected override async Task OnEvent(FB_Event ev)
{
switch (ev)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/uwpapp/FBClient_Uwp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public UpdateEventArgs(UpdateStatus _update_event, object _data)
}
}

protected override async Task onEvent(FB_Event ev)
protected override async Task OnEvent(FB_Event ev)
{
switch (ev)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/uwpapp/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private async void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChang
private void MainPage_Unloaded(object sender, RoutedEventArgs e)
{
Client.UpdateEvent -= Client_UpdateEvent;
Client.StopListening();
Client.StopListening().Wait();
}

private async void Client_UpdateEvent(object sender, UpdateEventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion examples/wpfapp/FBClient_Wpf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public UpdateEventArgs(UpdateStatus _update_event, object _data)
}
}

protected override async Task onEvent(FB_Event ev)
protected override async Task OnEvent(FB_Event ev)
{
switch (ev)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/wpfapp/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private async void MainPage_Loaded(object sender, RoutedEventArgs e)
private void MainPage_Unloaded(object sender, RoutedEventArgs e)
{
Client.UpdateEvent -= Client_UpdateEvent;
Client.StopListening();
Client.StopListening().Wait();
}

private void Client_UpdateEvent(object sender, UpdateEventArgs e)
Expand Down
Loading

0 comments on commit 3c523a9

Please sign in to comment.