Info
Version: | 1.0.0 |
Author(s): | Roberto Camara |
Last Update: | Monday, September 23, 2019 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/RobertoCamara/UtilsSignalR |
NuGet Url: | https://www.nuget.org/packages/SignalRConnectionStandard |
Install
Install-Package SignalRConnectionStandard
dotnet add package SignalRConnectionStandard
paket add SignalRConnectionStandard
SignalRConnectionStandard Download (Unzip the "nupkg" after downloading)
Dependencies
- Microsoft.AspNet.SignalR.Client(>= 2.4.1)
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");.