Example #1
0
        protected override void CopyValues(ScalarPropertyBuilder source)
        {
            var guidSource = source as GuidPropertyBuilder;

            if (guidSource == null)
            {
                throw new NotSupportedException("The provided source was not a GuidPropertyBuilder.");
            }
        }
        protected override void CopyValues(ScalarPropertyBuilder source)
        {
            var boolSource = source as BooleanPropertyBuilder;

            if (boolSource == null)
            {
                throw new NotSupportedException("The provided source was not a BooleanPropertyBuilder");
            }
        }
        public ScalarPropertyBuilder CopyFrom(ScalarPropertyBuilder source)
        {
            this.IsExcluded      = source.IsExcluded;
            this.ValueGeneration = source.ValueGeneration;
            this.Nullable        = source.Nullable;
            this.PropertyType    = source.PropertyType;

            CopyValues(source);

            return(this);
        }
Example #4
0
        protected override void CopyValues(ScalarPropertyBuilder source)
        {
            var blobSource = source as BlobPropertyBuilder;

            if (blobSource == null)
            {
                throw new NotSupportedException("The provided source was not a BlobPropertyBuilder");
            }

            this.MaxLength = blobSource.MaxLength;
        }
        protected override void CopyValues(ScalarPropertyBuilder source)
        {
            var dateTimeSource = source as DateTimePropertyBuilder;

            if (dateTimeSource == null)
            {
                throw new NotSupportedException("The provided source was not a DateTimePropertyBuilder");
            }

            this.DateTimeType = dateTimeSource.DateTimeType;
        }
Example #6
0
        protected override void CopyValues(ScalarPropertyBuilder source)
        {
            var enumSource = source as EnumPropertyBuilder;

            if (enumSource == null)
            {
                throw new NotSupportedException("The provided source was not a EnumPropertyBuilder.");
            }

            EnumTypeInfo          = enumSource.EnumTypeInfo;
            UnderlyingNumericType = enumSource.UnderlyingNumericType;
        }
Example #7
0
        protected override void CopyValues(ScalarPropertyBuilder source)
        {
            var textSource = source as TextPropertyBuilder;

            if (textSource == null)
            {
                throw new NotSupportedException("The provided source was not a TextPropertyBuilder.");
            }

            this.MaxLength   = textSource.MaxLength;
            this.FixedLength = textSource.FixedLength;
            this.Unicode     = textSource.Unicode;
        }
        protected override void CopyValues(ScalarPropertyBuilder source)
        {
            var numericSource = source as NumericPropertyBuilder;

            if (numericSource == null)
            {
                throw new NotSupportedException("The provided source was not a NumericPropertyBuilder.");
            }

            this.NumericType = numericSource.NumericType;
            this.Precision   = numericSource.Precision;
            this.Scale       = numericSource.Scale;
        }
 protected abstract void CopyValues(ScalarPropertyBuilder source);
 private ScalarPropertyBuilder CreatePropertyMetadata(string name, Type clrType)
 {
     return(ScalarPropertyBuilder.CreateScalar(name, clrType));
 }