Exemplo n.º 1
0
        // Token: 0x06000A62 RID: 2658 RVA: 0x0004446C File Offset: 0x0004266C
        internal static bool TryLoadRegionalConfiguration(MailboxSession session, out MailboxRegionalConfiguration regionalConfiguration)
        {
            regionalConfiguration = null;
            ADUser aduser = Utils.GetADRecipient(UserSettings.GetExternalDirectoryOrganizationId(session), session.MailboxOwnerLegacyDN) as ADUser;

            if (aduser == null)
            {
                Utils.Tracer.TraceError <string>((long)typeof(MailboxData).GetHashCode(), "Can't find AD recipient by mailbox owner's DN {0}", session.MailboxOwnerLegacyDN);
                return(false);
            }
            MailboxStoreTypeProvider mailboxStoreTypeProvider = new MailboxStoreTypeProvider(aduser);

            mailboxStoreTypeProvider.MailboxSession = session;
            try
            {
                regionalConfiguration = (MailboxRegionalConfiguration)mailboxStoreTypeProvider.Read <MailboxRegionalConfiguration>(session.MailboxOwner.ObjectId);
            }
            catch (FormatException arg)
            {
                Utils.Tracer.TraceError <ADObjectId, FormatException>((long)typeof(MailboxData).GetHashCode(), "MailboxRegionalConfiguration cannot be retrieved for user {0}. Error: {1}", session.MailboxOwner.ObjectId, arg);
                return(false);
            }
            if (regionalConfiguration == null || null == regionalConfiguration.TimeZone || regionalConfiguration.TimeZone.ExTimeZone == null)
            {
                Utils.Tracer.TraceError <ADObjectId>((long)typeof(MailboxData).GetHashCode(), "User {0} doesn't set a valid RegionalConfiguration or TimeZone", session.MailboxOwner.ObjectId);
                return(false);
            }
            return(true);
        }
 // Token: 0x06000997 RID: 2455 RVA: 0x00040678 File Offset: 0x0003E878
 internal InfoFromUserMailboxSession(MailboxSession session)
 {
     this.UserLegacyDN = session.MailboxOwnerLegacyDN;
     this.DatabaseGuid = session.MailboxOwner.MailboxInfo.GetDatabaseGuid();
     this.MailboxGuid  = session.MailboxOwner.MailboxInfo.MailboxGuid;
     this.ExternalDirectoryOrganizationId = UserSettings.GetExternalDirectoryOrganizationId(session);
     this.DefaultCalendarFolderId         = session.GetDefaultFolderId(DefaultFolderType.Calendar);
     this.DefaultDeletedItemsFolderId     = session.GetDefaultFolderId(DefaultFolderType.DeletedItems);
     this.DefaultJunkEmailFolderId        = session.GetDefaultFolderId(DefaultFolderType.JunkEmail);
     this.DefaultOutboxFolderId           = session.GetDefaultFolderId(DefaultFolderType.Outbox);
 }
Exemplo n.º 3
0
 // Token: 0x06000A5D RID: 2653 RVA: 0x000442B0 File Offset: 0x000424B0
 public UserSettings(MailboxSession session)
 {
     this.LegacyDN = session.MailboxOwnerLegacyDN;
     this.ExternalDirectoryOrganizationId = UserSettings.GetExternalDirectoryOrganizationId(session);
 }