Пример #1
0
        public static IReadableUserConfiguration GetReadOnlyCalendarConfiguration(MailboxSession session, string configuration, UserConfigurationTypes type, bool createIfNonexisting)
        {
            StoreId defaultFolderId = session.GetDefaultFolderId(DefaultFolderType.Calendar);

            if (defaultFolderId != null)
            {
                return(UserConfigurationHelper.InternalGetFolderConfiguration <IReadableUserConfiguration>(session, defaultFolderId, configuration, type, (UserConfigurationManager configManager, string configName, UserConfigurationTypes configType, StoreId id) => configManager.GetReadOnlyFolderConfiguration(configName, configType, id), new Func <UserConfigurationManager, string, UserConfigurationTypes, StoreId, bool, IReadableUserConfiguration>(UserConfigurationHelper.RecreateFolderConfiguration), createIfNonexisting, false));
            }
            return(null);
        }
Пример #2
0
        public static UserConfiguration GetCalendarConfiguration(MailboxSession session, string configuration, UserConfigurationTypes type, bool createIfNonexisting)
        {
            StoreId defaultFolderId = session.GetDefaultFolderId(DefaultFolderType.Calendar);

            if (defaultFolderId != null)
            {
                return(UserConfigurationHelper.GetFolderConfiguration(session, defaultFolderId, configuration, type, createIfNonexisting, false));
            }
            return(null);
        }
Пример #3
0
 public static IReadableUserConfiguration GetReadOnlyMailboxConfiguration(MailboxSession session, string configuration, UserConfigurationTypes type, bool createIfNonexisting)
 {
     return(UserConfigurationHelper.InternalGetMailboxConfiguration <IReadableUserConfiguration>(session, configuration, type, createIfNonexisting, new Func <string, UserConfigurationTypes, IReadableUserConfiguration>(session.UserConfigurationManager.GetReadOnlyMailboxConfiguration), new Func <MailboxSession, string, UserConfigurationTypes, IReadableUserConfiguration>(UserConfigurationHelper.CreateMailboxConfiguration)));
 }
Пример #4
0
 public static UserConfiguration GetFolderConfiguration(MailboxSession mailboxSession, StoreId folderId, string configName, UserConfigurationTypes configType, bool createIfNonexisting, bool saveIfNonexisting = false)
 {
     return(UserConfigurationHelper.InternalGetFolderConfiguration <UserConfiguration>(mailboxSession, folderId, configName, configType, (UserConfigurationManager manager, string name, UserConfigurationTypes type, StoreId id) => manager.GetFolderConfiguration(name, type, id), new Func <UserConfigurationManager, string, UserConfigurationTypes, StoreId, bool, UserConfiguration>(UserConfigurationHelper.RecreateFolderConfiguration), createIfNonexisting, saveIfNonexisting));
 }
Пример #5
0
 public static UserConfiguration GetPublishingConfiguration(MailboxSession session, StoreId folderId, bool createIfNonexisting)
 {
     return(UserConfigurationHelper.GetFolderConfiguration(session, folderId, "Calendar.PublishOptions", UserConfigurationTypes.Dictionary, createIfNonexisting, false));
 }