Exemplo n.º 1
0
        public ModelScalarType CreateModelScalarType(
            string complexTypeName,
            string complexTypeExternalName,
            string propertyName,
            string propertyExternalName,
            string scalarTypeName,
            ModelScalarType suggestedType,
            short?maxLentgth,
            bool?fixedLength,
            bool?nullable,
            byte?precision,
            byte?scale,
            ModelErrors errors
            )
        {
            if (suggestedType != null)
            {
                var key = (complexTypeExternalName ?? complexTypeName) + "." + (propertyExternalName ?? propertyName) + ":" + scalarTypeName;
                return(this._RulesModelScalarType.HandleRules(key, suggestedType, this.GenerateRules));
            }
            else
            {
                var result = new ModelScalarType {
                    Name        = scalarTypeName,
                    MaxLength   = maxLentgth,
                    FixedLength = fixedLength,
                    Nullable    = nullable,
                    Precision   = precision,
                    Scale       = scale
                };
#warning CreateModelScalarType
                var key = (complexTypeExternalName ?? complexTypeName) + "." + (propertyExternalName ?? propertyName) + ":" + scalarTypeName;
                return(this._RulesModelScalarType.HandleRules(key, result, this.GenerateRules));
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Copy all but owner
 /// </summary>
 /// <param name="source"></param>
 public ModelScalarType(ModelScalarType source)
 {
     this._Name         = source._Name;
     this._ExternalName = source._ExternalName;
     this._Collection   = source._Collection;
     this._FixedLength  = source._FixedLength;
     this._MaxLength    = source._MaxLength;
     this._Nullable     = source._Nullable;
     this._Precision    = source._Precision;
     this._Scale        = source._Scale;
     this._Type         = source._Type;
     this._Unicode      = source._Unicode;
 }