Пример #1
0
        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);
        }
Пример #2
0
 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;
 }