MessagePropertyFilter.DefaultExtensionSize 属性
定义
获取或设置默认扩展缓冲区的大小(以字节为单位)。Gets or sets the size, in bytes, of the default extension buffer.
public:
property int DefaultExtensionSize { int get(); void set(int value); };
[System.Messaging.MessagingDescription("MsgDefaultExtensionSize")]
public int DefaultExtensionSize { get; set; }
[<System.Messaging.MessagingDescription("MsgDefaultExtensionSize")>]
member this.DefaultExtensionSize : int with get, set
Public Property DefaultExtensionSize As Integer
属性值
接收消息时创建的默认扩展缓冲区大小。The default extension buffer size to create when the message is received. 默认值为255字节。The default is 255 bytes.
- 属性
例外
分配的值为负。The assigned value is negative.
示例
下面的代码示例演示属性的用法 DefaultExtensionSize 。The following code example demonstrates the use of the DefaultExtensionSize property.
// Set the filter's DefaultExtensionSize
// property to 1024 bytes.
queue->MessageReadPropertyFilter->
DefaultExtensionSize = 1024;
// Display the new value of the filter's
// DefaultExtensionSize property.
Console::WriteLine(
"MessageReadPropertyFilter."
"DefaultExtensionSize: {0}",
queue->MessageReadPropertyFilter->
DefaultExtensionSize);
// Set the filter's DefaultExtensionSize property to 1024 bytes.
queue.MessageReadPropertyFilter.DefaultExtensionSize = 1024;
// Display the new value of the filter's DefaultExtensionSize property.
Console.WriteLine("MessageReadPropertyFilter.DefaultExtensionSize: {0}",
queue.MessageReadPropertyFilter.DefaultExtensionSize.ToString());
注解
默认扩展大小指定为消息的扩展分配的字节数。The default extension size specifies the number of bytes to allocate for the message's extension. Extension类的属性 Message 表示与消息关联的、应用程序定义的附加信息(例如二进制大型对象)。The Extension property of the Message class represents the additional, application-defined information associated with the message, such as a binary large object. 应用程序负责解释的内容 Extension 。It is the responsibility of the application to interpret the contents of the Extension.