public async void Register() { string connectionId = this.GetConnectionId(); DrapoPipeMessage message = new DrapoPipeMessage(); message.Type = DrapoPipeMessageType.Register; message.Data = connectionId; IClientProxy proxy = this.Clients.Client(connectionId); await proxy.SendAsync(this._options.Config.PipeActionNotify, message); }
public async Task <bool> Send(DrapoPipeMessage message, DrapoPipeAudienceType recipient) { IClientProxy proxy = this.GetRecipients(recipient); if (proxy == null) { return(await Task.FromResult <bool>(false)); } await proxy.SendAsync(this._options.Config.PipeActionNotify, message); return(await Task.FromResult <bool>(true)); }