MessageFilterTable<TFilterData>.GetMatchingValues 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回一个值,该值指示指定的消息或缓冲消息是否满足表中至少一个筛选器的匹配条件,然后将匹配筛选器的 FilterData
添加到集合。
重载
GetMatchingValues(Message, ICollection<TFilterData>) |
返回一个值,该值指示指定的消息或缓冲消息是否满足表中至少一个筛选器的匹配条件,然后将匹配筛选器的 |
GetMatchingValues(MessageBuffer, ICollection<TFilterData>) |
返回一个值,该值指示指定的消息缓冲区是否正好满足表中一个筛选器的匹配条件,以及是否将匹配筛选器的 |
注解
当预期有多个筛选器与消息或缓冲消息相匹配,并且只需要 FilterData
时,请使用此方法。
GetMatchingValues(Message, ICollection<TFilterData>)
返回一个值,该值指示指定的消息或缓冲消息是否满足表中至少一个筛选器的匹配条件,然后将匹配筛选器的 FilterData
添加到集合。
public:
virtual bool GetMatchingValues(System::ServiceModel::Channels::Message ^ message, System::Collections::Generic::ICollection<TFilterData> ^ results);
public bool GetMatchingValues (System.ServiceModel.Channels.Message message, System.Collections.Generic.ICollection<TFilterData> results);
abstract member GetMatchingValues : System.ServiceModel.Channels.Message * System.Collections.Generic.ICollection<'FilterData> -> bool
override this.GetMatchingValues : System.ServiceModel.Channels.Message * System.Collections.Generic.ICollection<'FilterData> -> bool
Public Function GetMatchingValues (message As Message, results As ICollection(Of TFilterData)) As Boolean
参数
- results
- ICollection<TFilterData>
存储泛型 ICollection<T><FilterData
> 中匹配操作筛选器的 FilterData
的引用参数。
返回
如果消息正好满足表中一个筛选器的匹配条件,则为 true
;如果不满足任何筛选器,则为 false
。
实现
例外
results
为 null
。
筛选器试图检查消息正文的内容。
注解
当预期会有多个筛选器与消息相匹配,同时只需要 FilterData
,且不检查消息正文时,请使用此方法。
匹配的 FilterData
对象的 MessageFilter 存储在 results
的 ICollection<T> 参数中。
此方法实现 GetMatchingValues。
适用于
GetMatchingValues(MessageBuffer, ICollection<TFilterData>)
返回一个值,该值指示指定的消息缓冲区是否正好满足表中一个筛选器的匹配条件,以及是否将匹配筛选器的 FilterData
添加到 results
集合中。
public:
virtual bool GetMatchingValues(System::ServiceModel::Channels::MessageBuffer ^ buffer, System::Collections::Generic::ICollection<TFilterData> ^ results);
public bool GetMatchingValues (System.ServiceModel.Channels.MessageBuffer buffer, System.Collections.Generic.ICollection<TFilterData> results);
abstract member GetMatchingValues : System.ServiceModel.Channels.MessageBuffer * System.Collections.Generic.ICollection<'FilterData> -> bool
override this.GetMatchingValues : System.ServiceModel.Channels.MessageBuffer * System.Collections.Generic.ICollection<'FilterData> -> bool
Public Function GetMatchingValues (buffer As MessageBuffer, results As ICollection(Of TFilterData)) As Boolean
参数
- buffer
- MessageBuffer
要测试的 MessageBuffer。
- results
- ICollection<TFilterData>
存储 buffer
满足的筛选器的筛选数据的引用参数。
返回
如果缓冲消息正好满足表中一个 ActionMessageFilter 的匹配条件,则为 true
;如果不满足任何筛选器,则为 false
。
实现
例外
results
为 null
。
注解
当预期有多个筛选器与缓冲消息相匹配,并且只需要 FilterData
时,请使用此方法。
FilterData
匹配MessageFilter对象存储在 .results
ICollection<T>
此方法实现 GetMatchingValues。