// Token: 0x06001021 RID: 4129 RVA: 0x0005E774 File Offset: 0x0005C974
        private RunData CreateRunData(DirectoryProcessorMailboxData mailboxData)
        {
            ValidateArgument.NotNull(mailboxData, "mailboxData");
            RunData runData = new RunData(Guid.NewGuid(), mailboxData, new ThrowIfShuttingDown(this.ThrowIfShuttingDown));

            runData.CreateRunFolder();
            return(runData);
        }
예제 #2
0
 // Token: 0x060010E7 RID: 4327 RVA: 0x00062EE0 File Offset: 0x000610E0
 public RunData(Guid runId, DirectoryProcessorMailboxData mailboxData, ThrowIfShuttingDown throwIfShuttingDown)
 {
     ValidateArgument.NotNull(mailboxData, "mailboxData");
     ValidateArgument.NotNull(throwIfShuttingDown, "throwIfShuttingDown");
     this.RunId               = runId;
     this.MailboxData         = mailboxData;
     this.throwIfShuttingDown = throwIfShuttingDown;
     this.RunStartTime        = DateTime.UtcNow;
     this.TenantId            = RunData.GetTenantIdentifiableDN(this.MailboxData.OrgId);
     this.TenantGuid          = RunData.GetTenantGuid(this.MailboxData.OrgId);
 }
예제 #3
0
 // Token: 0x0600103C RID: 4156 RVA: 0x0005EB50 File Offset: 0x0005CD50
 public bool Equals(DirectoryProcessorMailboxData other)
 {
     return(other != null && base.MailboxGuid.Equals(other.MailboxGuid) && base.Equals(other));
 }
        // 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);
        }