Esempio n. 1
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. 2
0
 // Token: 0x0600100D RID: 4109 RVA: 0x0005DFC0 File Offset: 0x0005C1C0
 private string GetEntriesFilePath(string runFolderPath)
 {
     return(ADCrawler.GetEntriesFilePath(runFolderPath, this.ADEntriesFileName));
 }
        // 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);
        }