/// <summary> /// Completes an asynchronous request cancel /// </summary> private void OnCancel(object stateInfo) { try { lock (this) { // check if subscription object has been disposed. if (m_disposed) { return; } } // unmarshal arguments. Opc.Da.Request request = null; CancelCompleteEventHandler callback = null; if (typeof(object[]).IsInstanceOfType(stateInfo)) { request = (Opc.Da.Request)((object[])stateInfo)[0]; callback = (CancelCompleteEventHandler)((object[])stateInfo)[1]; } // invoke callback. callback(request.Handle); } catch (Exception e) { string message = e.Message; } }
/// <summary> /// Cancels an existing request. /// </summary> public bool CancelRequest(Request request, CancelCompleteEventHandler callback) { lock (this) { // check if it is a valid request. if (!m_requests.Contains(request.RequestID)) { return(false); } // request will be removed when the cancel complete callback arrives. if (callback != null) { request.CancelComplete += callback; } // no confirmation required - remove request immediately. else { m_requests.Remove(request.RequestID); } // request will be cancelled. return(true); } }
// Token: 0x06000484 RID: 1156 RVA: 0x0000DB17 File Offset: 0x0000CB17 public void CancelRequest(IRequest request, CancelCompleteEventHandler callback) { if (this.m_server == null) { throw new NotConnectedException(); } ((IServer)this.m_server).CancelRequest(request, callback); }
public bool CancelRequest(Request request, CancelCompleteEventHandler callback) { lock (this) { if (!this.m_requests.Contains(request.RequestID)) { return(false); } if (callback != null) { request.CancelComplete += callback; } else { this.m_requests.Remove(request.RequestID); } return(true); } }
// Token: 0x060004EB RID: 1259 RVA: 0x0000E6CA File Offset: 0x0000D6CA public void Cancel(IRequest request, CancelCompleteEventHandler callback) { this.m_subscription.Cancel(request, callback); }
/// <summary> /// Cancels the request, if possible. /// </summary> public void Cancel(CancelCompleteEventHandler callback) /*OpcGroup.Cancel(this, callback);*/ }
public void Cancel(CancelCompleteEventHandler callback) { this.m_subscription.Cancel(this, callback); }
/// <summary> /// Cancels an asynchronous read or write operation. /// </summary> /// <param name="request">The object returned from the BeginRead or BeginWrite request.</param> /// <param name="callback">The function to invoke when the cancel completes.</param> public void Cancel(IRequest request, CancelCompleteEventHandler callback) { throw new NotImplementedException("Cancel"); }