예제 #1
0
        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);
            }
        }
예제 #2
0
 public void PopulateLogEntry(MailboxStatisticsLogEntry logEntry)
 {
     logEntry[MailboxStatisticsLogEntrySchema.AttachmentTableTotalSizeInBytes] = this.AttachmentTableTotalSize.ToBytes();
     logEntry[MailboxStatisticsLogEntrySchema.DatabaseName]     = this.DatabaseName;
     logEntry[MailboxStatisticsLogEntrySchema.DeletedItemCount] = this.DeletedItemCount;
     logEntry[MailboxStatisticsLogEntrySchema.DisconnectDate]   = this.DisconnectDate;
     logEntry[MailboxStatisticsLogEntrySchema.MailboxState]     = this.MailboxState;
     logEntry[MailboxStatisticsLogEntrySchema.ExternalDirectoryOrganizationId] = this.OrganizationId;
     logEntry[MailboxStatisticsLogEntrySchema.IsArchiveMailbox]             = this.IsArchive;
     logEntry[MailboxStatisticsLogEntrySchema.IsMoveDestination]            = this.IsMoveDestination;
     logEntry[MailboxStatisticsLogEntrySchema.IsQuarantined]                = this.IsQuarantined;
     logEntry[MailboxStatisticsLogEntrySchema.ItemCount]                    = this.ItemCount;
     logEntry[MailboxStatisticsLogEntrySchema.LastLogonTime]                = this.LastLogonTimestamp;
     logEntry[MailboxStatisticsLogEntrySchema.LogicalSizeInM]               = this.TotalLogicalSize.ToMB();
     logEntry[MailboxStatisticsLogEntrySchema.MailboxGuid]                  = this.Guid;
     logEntry[MailboxStatisticsLogEntrySchema.MailboxType]                  = this.ComputeMailboxType((LoadBalanceMailboxType)logEntry[MailboxStatisticsLogEntrySchema.MailboxType]);
     logEntry[MailboxStatisticsLogEntrySchema.MessageTableTotalSizeInBytes] = this.MessageTableTotalSize.ToBytes();
     logEntry[MailboxStatisticsLogEntrySchema.OtherTablesTotalSizeInBytes]  = this.OtherTablesTotalSize.ToBytes();
     logEntry[MailboxStatisticsLogEntrySchema.PhysicalSizeInM]              = this.TotalPhysicalSize.ToMB();
     logEntry[MailboxStatisticsLogEntrySchema.TotalDeletedItemSizeInBytes]  = this.TotalDeletedItemSize.ToBytes();
     logEntry[MailboxStatisticsLogEntrySchema.TotalItemSizeInBytes]         = this.TotalItemSize.ToBytes();
     logEntry[MailboxStatisticsLogEntrySchema.CreationTimestamp]            = this.CreationTimestamp;
     logEntry[MailboxStatisticsLogEntrySchema.ItemsPendingUpgrade]          = this.ItemsPendingUpgrade;
 }
예제 #3
0
 public void PopulateLogEntry(MailboxStatisticsLogEntry logEntry)
 {
     throw new InvalidOperationException("Empty mailboxes should not be logged.");
 }