internal NormalizedSerializer(Type t) : base(t) { SqlUserDefinedTypeAttribute udtAttr = SerializationHelperSql9.GetUdtAttribute(t); _normalizer = new BinaryOrderedUdtNormalizer(t, true); _isFixedSize = udtAttr.IsFixedLength; _maxSize = _normalizer.Size; }
internal static int GetUdtMaxLength(Type t) { SqlUdtInfo udtInfo = SqlUdtInfo.GetFromType(t); if (Format.Native == udtInfo.SerializationFormat) { // In the native format, the user does not specify the // max byte size, it is computed from the type definition return(SerializationHelperSql9.SizeInBytes(t)); } else { // In all other formats, the user specifies the maximum size in bytes. return(udtInfo.MaxByteSize); } }
internal NormalizedSerializer(Type t) : base(t) { _ = SerializationHelperSql9.GetUdtAttribute(t); _normalizer = new BinaryOrderedUdtNormalizer(t, true); }