protected static AsyncResult <ActiveDirectoryConnectivityOutcome> SingleCommandTransactionSync(ActiveDirectoryConnectivityBase.ActiveDirectoryConnectivityTask command)
        {
            AsyncResult <ActiveDirectoryConnectivityOutcome> result = new AsyncResult <ActiveDirectoryConnectivityOutcome>();

            ActiveDirectoryConnectivityBase.SingleCommandTransaction(command, result);
            return(result);
        }
        internal static IEnumerable <AsyncResult <ActiveDirectoryConnectivityOutcome> > BuildTransactionHelper(params Func <ActiveDirectoryConnectivityBase>[] createInstances)
        {
            int i = 0;

            while (i < createInstances.Length)
            {
                Func <ActiveDirectoryConnectivityBase> createInstance = createInstances[i];
                using (ActiveDirectoryConnectivityBase instance = createInstance())
                {
                    if (instance != null)
                    {
                        goto IL_78;
                    }
                }
IL_DF:
                i++;
                continue;
                goto IL_DF;
IL_78:
                ActiveDirectoryConnectivityBase instance;
                foreach (AsyncResult <ActiveDirectoryConnectivityOutcome> transaction in instance.BuildTransactions())
                {
                    yield return(transaction);
                }
                goto IL_DF;
            }
            yield break;
        }
Example #3
0
 protected override IEnumerable <AsyncResult <ActiveDirectoryConnectivityOutcome> > BuildTransactions()
 {
     if (base.Context.UseADDriver)
     {
         yield return(ActiveDirectoryConnectivityBase.SingleCommandTransactionSync(new ActiveDirectoryConnectivityBase.ActiveDirectoryConnectivityTask(this.SearchUsingADDriver)));
     }
     else
     {
         yield return(ActiveDirectoryConnectivityBase.SingleCommandTransactionSync(new ActiveDirectoryConnectivityBase.ActiveDirectoryConnectivityTask(this.Search)));
     }
     yield break;
 }
Example #4
0
 protected override void InternalProcessRecord()
 {
     base.InternalBeginProcessing();
     TaskLogger.LogEnter();
     try
     {
         this.RunTasksWithTimeout(ExDateTime.Now.AddMinutes((double)this.TotalTimeoutInMinutes), ActiveDirectoryConnectivityBase.BuildTransactionHelper(this.BuildActiveDirectoryConnectivityTestPipeline()));
     }
     catch (LocalizedException e)
     {
         this.HandleException(e);
     }
     finally
     {
         if (this.monitoringData != null)
         {
             this.monitoringData.PerformanceCounters.Add(new MonitoringPerformanceCounter(TestActiveDirectoryConnectivityTask.CmdletMonitoringEventSource, TestActiveDirectoryConnectivityTask.PerformanceCounter, this.BuildInstanceName(), this.TotalLatency.TotalMilliseconds));
             if (this.TotalLatency.TotalMilliseconds > 0.0)
             {
                 this.monitoringData.Events.Add(new MonitoringEvent(TestActiveDirectoryConnectivityTask.CmdletMonitoringEventSource, 3001, EventTypeEnumeration.Success, Strings.ActiveDirectoryConnectivityTransactionsAllSucceeded.ToString()));
             }
             base.WriteObject(this.monitoringData);
         }
         TaskLogger.LogExit();
     }
 }
Example #5
0
        protected override IEnumerable <AsyncResult <ActiveDirectoryConnectivityOutcome> > BuildTransactions()
        {
            yield return(ActiveDirectoryConnectivityBase.SingleCommandTransactionSync(new ActiveDirectoryConnectivityBase.ActiveDirectoryConnectivityTask(this.MachinePing)));

            yield break;
        }