예제 #1
0
 protected override void WriteResult <T>(IEnumerable <T> dataObjects)
 {
     if (base.ParameterSetName == "CookieSet")
     {
         SyncTaskHelper.HandleTaskWritePagedResult <ADContact>((IEnumerable <ADContact>)dataObjects, this.inputCookie, ref this.outputCookie, () => base.Stopping, new SyncTaskHelper.OneParameterMethod <bool, IConfigurable>(base.ShouldSkipObject), new SyncTaskHelper.VoidOneParameterMethod <IConfigurable>(this.WriteResult), this.Pages, new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.TaskErrorLoggingDelegate(base.WriteError));
         return;
     }
     base.WriteResult <T>(dataObjects);
 }
        protected override void WriteResult <T>(IEnumerable <T> dataObjects)
        {
            SyncTaskHelper.OneParameterMethod <bool, IConfigurable> oneParameterMethod  = null;
            SyncTaskHelper.OneParameterMethod <bool, IConfigurable> oneParameterMethod2 = null;
            ADRawEntry adrawEntry = null;

            if (dataObjects is ADPagedReader <ADRawEntry> )
            {
                bool flag;
                if (this.requireTwoQueries)
                {
                    IEnumerable <ADRawEntry> dataObjects2 = (IEnumerable <ADRawEntry>)dataObjects;
                    IEnumerable <ADRawEntry> dataObjects3 = this.reader2;
                    SyncCookie syncCookie = this.inputCookie;
                    SyncTaskHelper.ParameterlessMethod <bool> isStopping = () => base.Stopping;
                    if (oneParameterMethod == null)
                    {
                        oneParameterMethod = ((IConfigurable dataObject) => false);
                    }
                    this.searchNeedsRetry = !SyncTaskHelper.HandleTaskWritePagedResult <ADRawEntry>(dataObjects2, dataObjects3, syncCookie, ref this.outputCookie, isStopping, oneParameterMethod, new SyncTaskHelper.VoidOneParameterMethod <IConfigurable>(this.WriteResult), this.Pages, new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.TaskErrorLoggingDelegate(base.WriteError), out flag);
                }
                else
                {
                    IEnumerable <ADRawEntry> dataObjects4 = (IEnumerable <ADRawEntry>)dataObjects;
                    SyncCookie syncCookie2 = this.inputCookie;
                    SyncTaskHelper.ParameterlessMethod <bool> isStopping2 = () => base.Stopping;
                    if (oneParameterMethod2 == null)
                    {
                        oneParameterMethod2 = ((IConfigurable dataObject) => false);
                    }
                    this.searchNeedsRetry = !SyncTaskHelper.HandleTaskWritePagedResult <ADRawEntry>(dataObjects4, syncCookie2, ref this.outputCookie, isStopping2, oneParameterMethod2, new SyncTaskHelper.VoidOneParameterMethod <IConfigurable>(this.WriteResult), this.Pages, new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.TaskErrorLoggingDelegate(base.WriteError), out flag);
                }
                if (!this.searchNeedsRetry && !flag)
                {
                    adrawEntry = new DeletedRecipient();
                }
            }
            else
            {
                adrawEntry = ((List <ADRawEntry>)dataObjects)[0];
            }
            if (adrawEntry != null)
            {
                this.outputCookie = new SyncCookie(this.inputCookie.DomainController, this.inputCookie.HighWatermarks, WatermarkMap.Empty, null);
                this.WriteResult(adrawEntry);
            }
        }