// Token: 0x0600101F RID: 4127 RVA: 0x0005E678 File Offset: 0x0005C878
        private List <DirectoryProcessorBaseTask> GetGenerators(RunData runData)
        {
            Utilities.DebugTrace(DirectoryProcessorAssistant.Tracer, "Entering DirectoryProcessorAssistant.GetGenerators", new object[0]);
            List <DirectoryProcessorBaseTask> list = new List <DirectoryProcessorBaseTask>();

            if (Utilities.TestFlag == TestFlag.Off || TestFlag.GroupMetrics == Utilities.TestFlag)
            {
                list.Add(new GroupMetricsGenerator(runData, this.groupMetricsMailboxes));
            }
            if (Utilities.TestFlag == TestFlag.Off || TestFlag.UnifiedMessaging == Utilities.TestFlag)
            {
                list.Add(new GrammarGenerator(runData, this.grammarGeneratorMailboxes));
                list.Add(new DtmfMapGenerator(runData, this.grammarGeneratorMailboxes));
            }
            return(list);
        }
 // Token: 0x06001022 RID: 4130 RVA: 0x0005E7AC File Offset: 0x0005C9AC
 private void LogException(RunData runData, Exception e, DirectoryProcessorBaseTask task, DirectoryProcessorBaseTaskContext taskContext)
 {
     Utilities.ErrorTrace(DirectoryProcessorAssistant.Tracer, "DirectoryProcessorAssistant.DoTask, Exception='{0}' for Org '{1}' Run '{2}' Task name '{3}' Error message '{4}'", new object[]
     {
         e,
         runData.OrgId,
         runData.RunId,
         task.ClassName,
         e.Message
     });
     UmGlobals.ExEvent.LogEvent(UMEventLogConstants.Tuple_DirectoryProcessorTaskThrewException, null, new object[]
     {
         runData.TenantId,
         runData.RunId,
         task.ClassName,
         CommonUtil.ToEventLogString(e)
     });
 }
Esempio n. 3
0
        // Token: 0x06001005 RID: 4101 RVA: 0x0005D984 File Offset: 0x0005BB84
        public static ADCrawler Create(RunData runData, RecipientType recipientType)
        {
            ADCrawler result = null;

            if (recipientType != RecipientType.User)
            {
                if (recipientType != RecipientType.Group)
                {
                    ExAssert.RetailAssert(false, "Add new crawler. ");
                }
                else
                {
                    result = new DLADCrawler(runData);
                }
            }
            else
            {
                result = new UserADCrawler(runData);
            }
            return(result);
        }
Esempio n. 4
0
 // Token: 0x06001000 RID: 4096 RVA: 0x0005D93C File Offset: 0x0005BB3C
 public ADCrawler(RunData runData) : base(runData)
 {
 }
Esempio n. 5
0
 // Token: 0x06000FF7 RID: 4087 RVA: 0x0005D8E0 File Offset: 0x0005BAE0
 public DirectoryProcessorBaseTask(RunData runData)
 {
     ValidateArgument.NotNull(runData, "runData");
     this.RunData = runData;
     this.Logger  = this.CreateLogger(this.Trace);
 }
 // Token: 0x06001018 RID: 4120 RVA: 0x0005E065 File Offset: 0x0005C265
 public ADCrawlerTaskContext(MailboxData mailboxData, TimeBasedDatabaseJob job, Queue <TaskQueueItem> taskQueue, AssistantStep step, TaskStatus taskStatus, RunData runData, IList <DirectoryProcessorBaseTask> deferredFinalizeTasks) : base(mailboxData, job, taskQueue, step, taskStatus, runData, deferredFinalizeTasks)
 {
 }
        // Token: 0x0600101C RID: 4124 RVA: 0x0005E0C8 File Offset: 0x0005C2C8
        public override AssistantTaskContext InitialStep(AssistantTaskContext context)
        {
            Utilities.DebugTrace(DirectoryProcessorAssistant.Tracer, "Entering DirectoryProcessorAssistant.InitialStep", new object[0]);
            DirectoryProcessorMailboxData directoryProcessorMailboxData = context.MailboxData as DirectoryProcessorMailboxData;
            AssistantTaskContext          result;

            try
            {
                Queue <TaskQueueItem> queue = new Queue <TaskQueueItem>();
                RunData runData             = this.CreateRunData(directoryProcessorMailboxData);
                GrammarGenerator.CleanUpOldGrammarRuns(runData, DirectoryProcessorAssistant.Tracer);
                UmGlobals.ExEvent.LogEvent(UMEventLogConstants.Tuple_DirectoryProcessorStarted, null, new object[]
                {
                    runData.TenantId,
                    runData.MailboxGuid,
                    runData.RunId
                });
                List <DirectoryProcessorBaseTask> generators = this.GetGenerators(runData);
                List <DirectoryProcessorBaseTask> list       = this.FilterGenerators(generators, runData, RecipientType.User);
                List <DirectoryProcessorBaseTask> list2      = this.FilterGenerators(generators, runData, RecipientType.Group);
                if (list.Count > 0)
                {
                    queue.Enqueue(new TaskQueueItem(ADCrawler.Create(runData, RecipientType.User), RecipientType.User));
                }
                foreach (DirectoryProcessorBaseTask task in list)
                {
                    queue.Enqueue(new TaskQueueItem(task, RecipientType.User));
                }
                if (list2.Count > 0)
                {
                    queue.Enqueue(new TaskQueueItem(ADCrawler.Create(runData, RecipientType.Group), RecipientType.Group));
                }
                foreach (DirectoryProcessorBaseTask task2 in list2)
                {
                    queue.Enqueue(new TaskQueueItem(task2, RecipientType.Group));
                }
                DirectoryProcessorBaseTaskContext directoryProcessorBaseTaskContext = new DirectoryProcessorBaseTaskContext(context.MailboxData, context.Job, queue, new AssistantStep(this.DoTask), TaskStatus.NoError, runData, new List <DirectoryProcessorBaseTask>());
                result = directoryProcessorBaseTaskContext;
            }
            catch (Exception ex)
            {
                string tenantIdentifiableDN = RunData.GetTenantIdentifiableDN(directoryProcessorMailboxData.OrgId);
                Utilities.ErrorTrace(DirectoryProcessorAssistant.Tracer, "DirectoryProcessorAssistant.InitialStep, Exception='{0}' for '{1}' in database '{2}'", new object[]
                {
                    ex,
                    tenantIdentifiableDN,
                    directoryProcessorMailboxData.DatabaseGuid
                });
                UmGlobals.ExEvent.LogEvent(UMEventLogConstants.Tuple_DirectoryProcessorInitialStepEncounteredException, null, new object[]
                {
                    tenantIdentifiableDN,
                    directoryProcessorMailboxData.DatabaseGuid,
                    CommonUtil.ToEventLogString(ex)
                });
                if (ex is IOException)
                {
                    throw new SkipException(ex);
                }
                throw;
            }
            return(result);
        }
        // Token: 0x06001020 RID: 4128 RVA: 0x0005E6F8 File Offset: 0x0005C8F8
        private List <DirectoryProcessorBaseTask> FilterGenerators(List <DirectoryProcessorBaseTask> generators, RunData runData, RecipientType type)
        {
            Utilities.DebugTrace(DirectoryProcessorAssistant.Tracer, "Entering DirectoryProcessorAssistant.FilterGenerators", new object[0]);
            List <DirectoryProcessorBaseTask> list = new List <DirectoryProcessorBaseTask>(generators.Count);

            foreach (DirectoryProcessorBaseTask directoryProcessorBaseTask in generators)
            {
                if (directoryProcessorBaseTask.ShouldRun(type))
                {
                    list.Add(directoryProcessorBaseTask);
                }
            }
            return(list);
        }
Esempio n. 9
0
 // Token: 0x060010CE RID: 4302 RVA: 0x00062667 File Offset: 0x00060867
 public Logger(RunData runData, Trace tracer, string taskName)
 {
     this.RunData  = runData;
     this.Tracer   = tracer;
     this.TaskName = taskName;
 }
Esempio n. 10
0
 // Token: 0x06001011 RID: 4113 RVA: 0x0005E000 File Offset: 0x0005C200
 public DirectoryProcessorBaseTaskContext(MailboxData mailboxData, TimeBasedDatabaseJob job, Queue <TaskQueueItem> taskQueue, AssistantStep step, TaskStatus taskStatus, RunData runData, IList <DirectoryProcessorBaseTask> deferredFinalizeTasks) : base(mailboxData, job, null)
 {
     base.Step                  = step;
     this.TaskQueue             = taskQueue;
     this.TaskStatus            = taskStatus;
     this.DeferredFinalizeTasks = deferredFinalizeTasks;
     this.RunData               = runData;
 }