Beispiel #1
0
 internal void AttachToConfigurationRecord(MgmtConfigurationRecord configRecord, FactoryRecord factoryRecord)
 {
     this._configRecord = configRecord;
     this._configKey    = factoryRecord.ConfigKey;
     this._group        = factoryRecord.Group;
     this._name         = factoryRecord.Name;
     this._typeName     = factoryRecord.FactoryTypeName;
     if (this._typeName != null)
     {
         FactoryRecord record = null;
         if (!configRecord.Parent.IsRootConfig)
         {
             record = configRecord.Parent.FindFactoryRecord(factoryRecord.ConfigKey, true);
         }
         this._declarationRequired = (record == null) || (record.FactoryTypeName == null);
         this._declared            = configRecord.GetFactoryRecord(factoryRecord.ConfigKey, true) != null;
     }
 }
Beispiel #2
0
        internal void AttachToConfigurationRecord(MgmtConfigurationRecord configRecord, FactoryRecord factoryRecord)
        {
            _configRecord    = configRecord;
            SectionGroupName = factoryRecord.ConfigKey;
            Name             = factoryRecord.Name;
            _typeName        = factoryRecord.FactoryTypeName;

            if (_typeName != null)
            {
                FactoryRecord parentFactoryRecord = null;
                if (!configRecord.Parent.IsRootConfig)
                {
                    parentFactoryRecord = configRecord.Parent.FindFactoryRecord(factoryRecord.ConfigKey, true);
                }

                IsDeclarationRequired = parentFactoryRecord?.FactoryTypeName == null;
                IsDeclared            = configRecord.GetFactoryRecord(factoryRecord.ConfigKey, true) != null;
            }
        }
        internal void AttachToConfigurationRecord(MgmtConfigurationRecord configRecord, FactoryRecord factoryRecord)
        {
            _configRecord = configRecord;
            _configKey    = factoryRecord.ConfigKey;
            _group        = factoryRecord.Group;
            _name         = factoryRecord.Name;
            _typeName     = factoryRecord.FactoryTypeName;

            if (_typeName != null)
            {
                FactoryRecord parentFactoryRecord = null;
                if (!configRecord.Parent.IsRootConfig)
                {
                    parentFactoryRecord = configRecord.Parent.FindFactoryRecord(factoryRecord.ConfigKey, true);
                }

                _declarationRequired = (parentFactoryRecord == null || parentFactoryRecord.FactoryTypeName == null);
                _declared            = configRecord.GetFactoryRecord(factoryRecord.ConfigKey, true) != null;
            }
        }