MessagePropertyFilter.DefaultBodySize 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置默认主体缓冲区的大小(以字节为单位)。
public:
property int DefaultBodySize { int get(); void set(int value); };
[System.Messaging.MessagingDescription("MsgDefaultBodySize")]
public int DefaultBodySize { get; set; }
[<System.Messaging.MessagingDescription("MsgDefaultBodySize")>]
member this.DefaultBodySize : int with get, set
Public Property DefaultBodySize As Integer
属性值
接收消息时创建的默认主体缓冲区大小。 默认值为 1024 个字节。
- 属性
例外
分配的值为负。
示例
下面的代码示例演示如何使用 DefaultBodySize 属性。
// Set the filter's DefaultBodySize
// property to 2048 bytes.
queue->MessageReadPropertyFilter->
DefaultBodySize = 2048;
// Display the new value of the filter's
// DefaultBodySize property.
Console::WriteLine(
"MessageReadPropertyFilter.DefaultBodySize: {0}",
queue->MessageReadPropertyFilter->DefaultBodySize);
// Set the filter's DefaultBodySize property to 2048 bytes.
queue.MessageReadPropertyFilter.DefaultBodySize = 2048;
// Display the new value of the filter's DefaultBodySize property.
Console.WriteLine("MessageReadPropertyFilter.DefaultBodySize: {0}",
queue.MessageReadPropertyFilter.DefaultBodySize.ToString());
注解
默认正文大小指定要为消息正文内容分配的字节数。 Body类的 Message 属性表示消息的序列化内容。 正文最多可包含 4 MB 的数据。 限制正文大小可以提高性能。
适用于
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈