public void OnClose(Func <Exception, Task> callback) { this.closeCallback = new HubCloseCallback(callback); this.runtime.InvokeSync <object>(ON_CLOSE_METHOD, this.InternalConnectionId, DotNetObjectReference.Create(this.closeCallback)); }
public void OnClose(Func <Exception, Task> callback) { this._closeCallback = new HubCloseCallback(callback); JSRuntime.Current.InvokeSync <object>(ON_CLOSE_METHOD, this.InternalConnectionId, new DotNetObjectRef(this._closeCallback)); }