LoadRuleIntoProperty() публичный Метод

Loads the property rule from the given xml string and applies this to the specified property definition
public LoadRuleIntoProperty ( string propertyRuleElement, IPropDef def ) : void
propertyRuleElement string The xml string containing the /// property rule
def IPropDef The property definition
Результат void
Пример #1
0
        /// <summary>
        /// Loads the property definition from the reader
        /// </summary>
        protected override void LoadFromReader()
        {
            _reader.Read();
            LoadPropertyName();
            LoadDisplayName();
            LoadPropertyType();
            LoadReadWriteRule();
            LoadDefaultValue();
            LoadDatabaseFieldName();
            LoadDescription();
            LoadCompulsory();
            LoadAutoIncrementing();
            LoadLength();
            LoadKeepValuePrivate();

            _reader.Read();

            _propDef = _defClassFactory.CreatePropDef(_propertyName, _assemblyName, _typeName, _readWriteRule,
                                                      _databaseFieldName, _defaultValueString, _compulsory, _autoIncrementing, _length, _displayName, _description, _keepValuePrivate);

            while (_reader.Name == "rule")
            {
                var loader = new XmlRuleLoader(DtdLoader, _defClassFactory);
                loader.LoadRuleIntoProperty(_reader.ReadOuterXml(), _propDef);
            }
            int len = "lookupList".Length;

            if (_reader.Name.Length >= len &&
                _reader.Name.Substring(_reader.Name.Length - len, len) == "LookupList")
            {
                XmlLookupListLoader.LoadLookupListIntoProperty(_reader.ReadOuterXml(), _propDef,
                                                               DtdLoader, _defClassFactory);
            }
        }
Пример #2
0
        /// <summary>
        /// Loads the property definition from the reader
        /// </summary>
        protected override void LoadFromReader()
        {
            _reader.Read();
            LoadPropertyName();
            LoadDisplayName();
            LoadPropertyType();
            LoadReadWriteRule();
            LoadDefaultValue();
            LoadDatabaseFieldName();
            LoadDescription();
            LoadCompulsory();
            LoadAutoIncrementing();
            LoadLength();
            LoadKeepValuePrivate();

            _reader.Read();

			_propDef = _defClassFactory.CreatePropDef(_propertyName, _assemblyName, _typeName, _readWriteRule,
                _databaseFieldName, _defaultValueString, _compulsory, _autoIncrementing, _length, _displayName, _description, _keepValuePrivate);

            while (_reader.Name == "rule")
            {
                var loader = new XmlRuleLoader(DtdLoader, _defClassFactory);
                loader.LoadRuleIntoProperty(_reader.ReadOuterXml(), _propDef);
            }
            int len = "lookupList".Length;
            if (_reader.Name.Length >= len &&
                _reader.Name.Substring(_reader.Name.Length - len, len) == "LookupList")
            {
                XmlLookupListLoader.LoadLookupListIntoProperty(_reader.ReadOuterXml(), _propDef,
                                                                           DtdLoader, _defClassFactory);
            }
        }