public int GetMailboxCount(OrganizationId organizationId, IConfigurationSession configSession) { int?mailboxCountFromCache = this.GetMailboxCountFromCache(organizationId.ConfigurationUnit); if (mailboxCountFromCache == null) { mailboxCountFromCache = new int?(SystemAddressListMemberCount.GetCount(configSession, organizationId, "All Mailboxes(VLV)", false)); this.organizationCache[organizationId.ConfigurationUnit] = new UpgradeBucketTaskHelper.OrganizationMailboxCountCache.OrganizationCountCacheEntry { WhenRead = ExDateTime.Now, MailboxCount = mailboxCountFromCache.Value }; } return(mailboxCountFromCache.Value); }
// Token: 0x060010DD RID: 4317 RVA: 0x00062B48 File Offset: 0x00060D48 internal void GetTenantRecipientCount(out int mailboxCount, out int contactCount, out int mailUserCount) { this.Logger.TraceDebug(this, "GetOrganizationRecipientCount", new object[0]); mailboxCount = 0; contactCount = 0; mailUserCount = 0; ADSessionSettings sessionSettings = ADSessionSettings.FromOrganizationIdWithoutRbacScopes(ADSystemConfigurationSession.GetRootOrgContainerIdForLocalForest(), this.OrgId, null, false); IConfigurationSession tenantOrTopologyConfigurationSession = DirectorySessionFactory.Default.GetTenantOrTopologyConfigurationSession(true, ConsistencyMode.IgnoreInvalid, sessionSettings, 227, "GetTenantRecipientCount", "f:\\15.00.1497\\sources\\dev\\MailboxAssistants\\src\\assistants\\DirectoryProcessor\\OrgMailboxScaleOutHelper.cs"); mailboxCount = SystemAddressListMemberCount.GetCount(tenantOrTopologyConfigurationSession, this.OrgId, "All Mailboxes(VLV)", true); contactCount = SystemAddressListMemberCount.GetCount(tenantOrTopologyConfigurationSession, this.OrgId, "All Contacts(VLV)", true); mailUserCount = SystemAddressListMemberCount.GetCount(tenantOrTopologyConfigurationSession, this.OrgId, "All Mail Users(VLV)", true); this.Logger.TraceDebug(this, "GetOrganizationRecipientCount - Mailbox count='{0}', Contact count='{1}', Mail user count='{2}'", new object[] { mailboxCount, contactCount, mailUserCount }); }
protected override void WriteResult(IConfigurable dataObject) { TaskLogger.LogEnter(new object[] { dataObject.Identity, dataObject }); if (this.Status) { RecipientEnforcementProvisioningPolicy recipientEnforcementProvisioningPolicy = dataObject as RecipientEnforcementProvisioningPolicy; if (recipientEnforcementProvisioningPolicy != null) { ADSessionSettings sessionSettings = ADSessionSettings.FromOrganizationIdWithoutRbacScopes(base.RootOrgContainerId, base.CurrentOrganizationId, base.ExecutingUserOrganizationId, false); IConfigurationSession configSession = DirectorySessionFactory.Default.CreateTenantConfigurationSession(true, ConsistencyMode.PartiallyConsistent, sessionSettings, 74, "WriteResult", "f:\\15.00.1497\\sources\\dev\\Management\\src\\Management\\ProvisioningTasks\\Recipient\\GetRecipientEnforcementProvisioningPolicy.cs"); recipientEnforcementProvisioningPolicy.MailboxCount = new int?(SystemAddressListMemberCount.GetCount(configSession, base.CurrentOrganizationId, "All Mailboxes(VLV)", false)); recipientEnforcementProvisioningPolicy.MailUserCount = new int?(SystemAddressListMemberCount.GetCount(configSession, base.CurrentOrganizationId, "All Mail Users(VLV)", false)); recipientEnforcementProvisioningPolicy.ContactCount = new int?(SystemAddressListMemberCount.GetCount(configSession, base.CurrentOrganizationId, "All Contacts(VLV)", false)); recipientEnforcementProvisioningPolicy.DistributionListCount = new int?(SystemAddressListMemberCount.GetCount(configSession, base.CurrentOrganizationId, "All Groups(VLV)", false)); try { recipientEnforcementProvisioningPolicy.TeamMailboxCount = new int?(SystemAddressListMemberCount.GetCount(configSession, base.CurrentOrganizationId, "TeamMailboxes(VLV)", false)); recipientEnforcementProvisioningPolicy.PublicFolderMailboxCount = new int?(SystemAddressListMemberCount.GetCount(configSession, base.CurrentOrganizationId, "PublicFolderMailboxes(VLV)", false)); recipientEnforcementProvisioningPolicy.MailPublicFolderCount = new int?(SystemAddressListMemberCount.GetCount(configSession, base.CurrentOrganizationId, "MailPublicFolders(VLV)", false)); } catch (ADNoSuchObjectException) { } } } base.WriteResult(dataObject); TaskLogger.LogExit(); }