Last active
May 15, 2019 16:00
-
-
Save tebeco/40ca29b078f3863ea45cc01ddf4fc7ef to your computer and use it in GitHub Desktop.
coincoin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.SignalR.Client; | |
using System; | |
using System.Threading.Tasks; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
public static async Task Main() | |
{ | |
Console.ReadLine(); | |
var hubConnection = new HubConnectionBuilder() | |
.WithUrl("https://dropme.azurewebsites.net/myHub") | |
.Build(); | |
hubConnection.On<string,string,string>("ReceiveMessage", (a, b, c) => | |
{ | |
Console.WriteLine($"a : '{a}'"); | |
Console.WriteLine($"b : '{b}'"); | |
Console.WriteLine($"c : '{c}'"); | |
}); | |
try | |
{ | |
await hubConnection.StartAsync(); | |
} | |
catch (Exception ex) | |
{ | |
Console.WriteLine(ex.ToString()); | |
} | |
Console.ReadLine(); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netcoreapp2.2</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="1.1.0" /> | |
</ItemGroup> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment