コード例 #1
0
        object IInternalConfigSystem.GetSection(string sectionName)
        {
            PrepareClientConfigSystem(sectionName);

            // Get the appropriate config record for the section.
            IInternalConfigRecord configRecord = null;

            if (DoesSectionOnlyUseMachineConfig(sectionName))
            {
                if (_isMachineConfigInited)
                {
                    configRecord = _machineConfigRecord;
                }
            }
            else
            {
                if (_isUserConfigInited)
                {
                    configRecord = _completeConfigRecord;
                }
            }

            // Call GetSection(), or return null if no configuration is yet available.
            return(configRecord?.GetSection(sectionName));
        }
コード例 #2
0
        object IInternalConfigSystem.GetSection(string sectionName)
        {
            this.PrepareClientConfigSystem(sectionName);
            IInternalConfigRecord record = null;

            if (this.DoesSectionOnlyUseMachineConfig(sectionName))
            {
                if (this._isMachineConfigInited)
                {
                    record = this._machineConfigRecord;
                }
            }
            else if (this._isUserConfigInited)
            {
                record = this._completeConfigRecord;
            }
            if (record != null)
            {
                return(record.GetSection(sectionName));
            }
            return(null);
        }
コード例 #3
0
 protected override object GetAppWebSection(string sectionName)
 {
     return(configRecord.GetSection(sectionName));
 }
コード例 #4
0
        public object GetSection(string section, string configPath)
        {
            IInternalConfigRecord rec = GetConfigRecord(configPath);

            return(rec.GetSection(section));
        }
コード例 #5
0
ファイル: RuntimeConfig.cs プロジェクト: dox0/DotNet471RS3
 protected virtual object GetSectionObject(string sectionName)
 {
     return(_configRecord.GetSection(sectionName));
 }