public void EmitLogEntry(ObjectLogCollector logCollector)
        {
            MailboxStatisticsLogEntry mailboxStatisticsLogEntry = new MailboxStatisticsLogEntry();

            mailboxStatisticsLogEntry[MailboxStatisticsLogEntrySchema.RecipientGuid] = base.Guid;
            mailboxStatisticsLogEntry[MailboxStatisticsLogEntrySchema.ExternalDirectoryOrganizationId] = this.OrganizationId;
            mailboxStatisticsLogEntry[MailboxStatisticsLogEntrySchema.MailboxType]  = LoadBalanceMailboxType.OrgIdMailbox;
            mailboxStatisticsLogEntry[MailboxStatisticsLogEntrySchema.MailboxState] = MailboxState.AdOnly;
            if (this.MailboxProvisioningConstraints != null)
            {
                mailboxStatisticsLogEntry[MailboxStatisticsLogEntrySchema.MailboxProvisioningConstraint]  = string.Format("{0}", this.MailboxProvisioningConstraints.HardConstraint);
                mailboxStatisticsLogEntry[MailboxStatisticsLogEntrySchema.MailboxProvisioningPreferences] = string.Join(";", from sc in this.MailboxProvisioningConstraints.SoftConstraints
                                                                                                                        select sc.Value);
            }
            if (base.Parent != null)
            {
                mailboxStatisticsLogEntry[MailboxStatisticsLogEntrySchema.DatabaseName] = base.Parent.Name;
            }
            bool flag = false;

            foreach (IPhysicalMailbox physicalMailbox in this.PhysicalMailboxes.OfType <PhysicalMailbox>())
            {
                MailboxStatisticsLogEntry mailboxStatisticsLogEntry2 = new MailboxStatisticsLogEntry();
                mailboxStatisticsLogEntry2.CopyChangesFrom(mailboxStatisticsLogEntry);
                physicalMailbox.PopulateLogEntry(mailboxStatisticsLogEntry2);
                logCollector.LogObject <MailboxStatisticsLogEntry>(mailboxStatisticsLogEntry2);
                flag = true;
            }
            if (!flag)
            {
                logCollector.LogObject <MailboxStatisticsLogEntry>(mailboxStatisticsLogEntry);
            }
        }
 public SoftDeletedMailboxRemover(DirectoryDatabase database, LoadBalanceAnchorContext context, ByteQuantifiedSize targetDatabaseSize, ObjectLogCollector logCollector)
 {
     this.database           = database;
     this.context            = context;
     this.targetDatabaseSize = targetDatabaseSize;
     this.logCollector       = logCollector;
 }
Beispiel #3
0
 public MailboxStatisticsLogger(ILogger logger, ObjectLogCollector logCollector) : base(logger)
 {
     AnchorUtil.ThrowOnNullArgument(logCollector, "logCollector");
     this.logCollector = logCollector;
 }