public async Task ConnectAsync() { hubConnection = new HubConnection(url); hubProxy = hubConnection.CreateHubProxy("pollHub"); //client event handlers hubProxy.On <ReportExecutionResultSet>("RequestUpdating", (resultSet) => RequestUpdated?.Invoke(resultSet)); hubProxy.On <ReportExecutionResultSet>("requestCancelling", (resultSet) => RequestCancelled?.Invoke(resultSet)); hubProxy.On("requestCancelled", () => AllRequestsCancelled?.Invoke()); hubConnection.Reconnecting += Reconnecting; hubConnection.Reconnected += Reconnected; hubConnection.Closed += ConnectionClosed; await hubConnection.Start(); }
internal void Cancel() { RequestCancelled?.Invoke(this, new EventArgs()); }
public virtual void OnRequestCancelled(WebEventArgs e) { RequestCancelled?.Invoke(this, e); }