SqlUserDefinedAggregateAttribute.MaxByteSize SqlUserDefinedAggregateAttribute.MaxByteSize SqlUserDefinedAggregateAttribute.MaxByteSize SqlUserDefinedAggregateAttribute.MaxByteSize Property

定义

聚合实例的最大大小(以字节为单位)。The maximum size, in bytes, of the aggregate instance.

public:
 property int MaxByteSize { int get(); void set(int value); };
public int MaxByteSize { get; set; }
member this.MaxByteSize : int with get, set
Public Property MaxByteSize As Integer

属性值

表示聚合实例的最大大小的 Int32 值。An Int32 value representing the maximum size of the aggregate instance.

注解

此属性没有指定本机格式序列化。This property does not have to be specified for Native format serialization.

必须指定MaxByteSizeUserDefined 序列化属性FormatYou must specify the MaxByteSize property with the UserDefined serialization Format.

为此属性指定的允许值的最大MaxByteSizeValue字段。The maximum allowed value for this property is specified by the MaxByteSizeValue field.

允许的最大大小为 2 千兆字节 (GB)。The maximum size allowed is 2 gigabytes (GB). 您可以指定一个介于 1 到 8000 个字节,则为-1 表示大于 8000 个字节,最多 2 个千兆字节为单位的值。You can specify a number from 1 to 8000 bytes, or -1 to represent a value larger than 8000 bytes, up to 2 gigabytes.

为用户定义的序列化指定,使用的聚合MaxByteSize指的是序列化数据的总大小。For an aggregate with user-defined serialization specified, MaxByteSize refers to the total size of the serialized data. 请考虑序列化的 10 个字符字符串的聚合 (Char)。Consider an aggregate serializing a string of 10 characters (Char). 字符串使用序列化时BinaryWriter,序列化字符串的总大小为 22 字节:每个 Unicode utf-16 字符占 2 个字节的字符,再加上 2 个控件的最大数目个字节的序列化二进制流所产生的开销的乘积。When the string is serialized using a BinaryWriter, the total size of the serialized string is 22 bytes: 2 bytes per Unicode UTF-16 character, multiplied by the maximum number of characters, plus 2 control bytes of overhead incurred from serializing a binary stream. 因此,当确定的值MaxByteSize,必须考虑序列化数据的总大小: 以二进制格式序列化的数据加上因序列化所产生的开销大小。So, when determining the value of MaxByteSize, the total size of the serialized data must be considered: the size of the data serialized in binary form plus the overhead incurred by serialization.

适用于