예제 #1
0
        internal DefaultFolder(DefaultFolderContext context, DefaultFolderInfo defaultFolderInfo, CultureInfo cultureInfo, MailboxSessionSharableDataManager sharableDataManager, DefaultFolderType defaultFolderType, bool deferInitialize, bool forceInitialize)
        {
            bool flag = (defaultFolderInfo.Behavior & DefaultFolderBehavior.AlwaysDeferInitialization) == DefaultFolderBehavior.AlwaysDeferInitialization;

            this.sharableDataManager = sharableDataManager;
            this.defaultFolderType   = defaultFolderType;
            this.defaultFolderInfo   = defaultFolderInfo;
            this.context             = context;
            this.cultureInfo         = cultureInfo;
            DefaultFolderData defaultFolderData  = this.GetDefaultFolderData();
            DefaultFolderData defaultFolderData2 = defaultFolderData ?? new DefaultFolderData(false);

            if (!this.context.DeferFolderIdInit && !defaultFolderData2.IdInitialized)
            {
                defaultFolderData2 = this.InitializeFolderIdPrivate();
            }
            if (forceInitialize || (!flag && !deferInitialize))
            {
                this.InitializeDefaultFolderIfNeeded(ref defaultFolderData2);
                if (this.GetDefaultFolderData().FolderId == null)
                {
                    ExTraceGlobals.DefaultFoldersTracer.TraceDebug <DefaultFolderInfo>((long)this.GetHashCode(), "DefaultFolder::Ctor. Cannot find the Id of the DefaultFolder. DefaultFolder = {0}.", this.defaultFolderInfo);
                }
            }
            if (defaultFolderData != defaultFolderData2)
            {
                this.SetDefaultFolderData(defaultFolderData2);
            }
        }
예제 #2
0
 internal DefaultFolder(DefaultFolderContext context, DefaultFolderInfo defaultFolderInfo, MailboxSessionSharableDataManager sharableDataManager, DefaultFolderType defaultFolderType, bool deferInitialize) : this(context, defaultFolderInfo, context.Session.InternalPreferedCulture, sharableDataManager, defaultFolderType, deferInitialize, false)
 {
 }