Пример #1
0
 /// <summary>
 ///     Remove all facets except Nullable (i.e. the setting of Nullable remains as is).
 /// </summary>
 internal void RemoveAllFacetsExceptNullable()
 {
     if (null != DefaultValue)
     {
         DefaultValue.Delete();
         _defaultAttr = null;
     }
     if (null != MaxLength)
     {
         MaxLength.Delete();
         _maxLengthAttr = null;
     }
     if (null != FixedLength)
     {
         FixedLength.Delete();
         _fixedLengthAttr = null;
     }
     if (null != Precision)
     {
         Precision.Delete();
         _precisionAttr = null;
     }
     if (null != Scale)
     {
         Scale.Delete();
         _scaleAttr = null;
     }
     if (null != Unicode)
     {
         Unicode.Delete();
         _unicodeAttr = null;
     }
     if (null != Collation)
     {
         Collation.Delete();
         _collationAttr = null;
     }
 }
Пример #2
0
        protected override void PreParse()
        {
            Debug.Assert(State != EFElementState.Parsed, "this object should not already be in the parsed state");

            ClearEFObject(_nullableAttr);
            _nullableAttr = null;

            ClearEFObject(_defaultAttr);
            _defaultAttr = null;

            ClearEFObject(_concurrencyModeAttr);
            _concurrencyModeAttr = null;

            ClearEFObject(_maxLengthAttr);
            _maxLengthAttr = null;

            ClearEFObject(_fixedLengthAttr);
            _fixedLengthAttr = null;

            ClearEFObject(_precisionAttr);
            _precisionAttr = null;

            ClearEFObject(_scaleAttr);
            _scaleAttr = null;

            ClearEFObject(_unicodeAttr);
            _unicodeAttr = null;

            ClearEFObject(_collationAttr);
            _collationAttr = null;

            ClearEFObject(_storeGeneratedPatternAttr);
            _storeGeneratedPatternAttr = null;

            base.PreParse();
        }