System.Configuration.BaseConfigurationRecord.EnsureSectionRecordImpl C# (CSharp) Метод

EnsureSectionRecordImpl() приватный Метод

private EnsureSectionRecordImpl ( string configKey, bool permitErrors, bool checkIfLocked ) : SectionRecord
configKey string
permitErrors bool
checkIfLocked bool
Результат SectionRecord
        private SectionRecord EnsureSectionRecordImpl(string configKey, bool permitErrors, bool checkIfLocked) {
            SectionRecord sectionRecord = GetSectionRecord(configKey, permitErrors);
            if (sectionRecord == null) {
                bool sectionAdded = false;
                lock (this) {
                    if (_sectionRecords == null) {
                        _sectionRecords = new Hashtable();
                    }
                    else {
                        sectionRecord = GetSectionRecord(configKey, permitErrors);
                    }

                    if (sectionRecord == null) {
                        sectionRecord = new SectionRecord(configKey);
                        _sectionRecords.Add(configKey, sectionRecord);
                        sectionAdded = true;
                    }
                }

                if (checkIfLocked && sectionAdded) {
                    sectionRecord.Locked = IsParentCausingLock(configKey);
                }
            }

            return sectionRecord;
        }
BaseConfigurationRecord