Share via


MessagePropertyFilter.ClearAll 方法

定义

将所有布尔型筛选器的值设置为 false,以便在接收消息时不检索消息属性。

public:
 void ClearAll();
public void ClearAll ();
member this.ClearAll : unit -> unit
Public Sub ClearAll ()

示例

下面的代码示例调用 ClearAll 方法。

// Set all of the queue's MessageReadPropertyFilter 
// Boolean properties to false.
queue->MessageReadPropertyFilter->ClearAll();
// Set all of the queue's MessageReadPropertyFilter Boolean properties
// to false.
queue.MessageReadPropertyFilter.ClearAll();

注解

使用 ClearAll 将所有布尔属性设置为 MessagePropertyFilterfalse。 这会导致在接收消息时不检索任何消息属性。 ClearAll不影响 、 DefaultExtensionSizeDefaultLabelSize的值DefaultBodySize

调用 ClearAll后,必须至少将一个筛选器属性 true 设置为 ,以便接收与消息相关的数据。 可以将单个属性设置为 true,也可以调用 SetDefaultsSetAll

适用于

另请参阅