public void FindAsync(FindCriteria criteria, object userState) { AsyncCallback cb = delegate(IAsyncResult result) { FindResponse ret = null; Exception error = null; try { ret = EndFind(result); } catch (Exception ex) { error = ex; } OnFindCompleted(new FindCompletedEventArgs(ret, error, cancelled, result.AsyncState)); }; cancelled = false; BeginFind(criteria, cb, userState); }
internal FindCompletedEventArgs(FindResponse result, Exception error, bool cancelled, object userState) : base(error, cancelled, userState) { this.Result = result; }
internal FindCompletedEventArgs(Exception error, bool cancelled, object userState, FindResponse result) : base(error, cancelled, userState) { this.result = result; }