public static IAsyncResult CreateAbandon(MsmqSessionReceiveContext receiveContext, TimeSpan timeout, AsyncCallback callback, object state) { if (onAbandon == null) { onAbandon = new Action <object>(OnAbandon); } return(new SessionReceiveContextAsyncResult(receiveContext, timeout, callback, state, onAbandon)); }
SessionReceiveContextAsyncResult(MsmqSessionReceiveContext receiveContext, TimeSpan timeout, AsyncCallback callback, object state, Action <object> target) : base(callback, state) { this.completionTransaction = Transaction.Current; this.timeoutHelper = new TimeoutHelper(timeout); this.receiveContext = receiveContext; ActionItem.Schedule(target, this); }
public static IAsyncResult CreateAbandon(MsmqSessionReceiveContext receiveContext, TimeSpan timeout, AsyncCallback callback, object state) { if (onAbandon == null) { onAbandon = new Action<object>(OnAbandon); } return new SessionReceiveContextAsyncResult(receiveContext, timeout, callback, state, onAbandon); }
SessionReceiveContextAsyncResult(MsmqSessionReceiveContext receiveContext, TimeSpan timeout, AsyncCallback callback, object state, Action<object> target) : base(callback, state) { this.completionTransaction = Transaction.Current; this.timeoutHelper = new TimeoutHelper(timeout); this.receiveContext = receiveContext; ActionItem.Schedule(target, this); }