Info
Version: | 1.0.7 |
Author(s): | Roberto Camara |
Last Update: | Thursday, April 19, 2018 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/RobertoCamara/UtilsSignalR |
NuGet Url: | https://www.nuget.org/packages/SignalRConnection |
Install
Install-Package SignalRConnection
dotnet add package SignalRConnection
paket add SignalRConnection
SignalRConnection Download (Unzip the "nupkg" after downloading)
Dependencies
- Microsoft.AspNet.SignalR.Client(>= 2.2.2)
- log4net(>= 2.0.8)
Tags
Ex.: SignalRCreateConnection exemploHub = new SignalRCreateConnection("http://localhost:8082/signalr", "ExampleHub");
SignalRCreateConnection notificationHub = new SignalRCreateConnection(host, "NotificationHub");
1- "Invocando um método no server SignalR"
Task<string> date = exemploHub.Invoke<string>("GetDateTimeFormated");
Console.WriteLine(date.Result);
2- Registrando-se para um evento
notificationHub.On<string>("getNewGuid", d =>
{
Console.WriteLine(d);
});
3- Verificar disponibilidade do serviço
if(notificationHub.ServerOnline)
{
Console.WriteLine("Serviço OnLine");
}.