MessageFilterTable<TFilterData>.GetMatchingValues 方法

定义

返回一个值,该值指示指定的消息或缓冲消息是否满足表中至少一个筛选器的匹配条件,然后将匹配筛选器的 FilterData 添加到集合。

重载

GetMatchingValues(Message, ICollection<TFilterData>)

返回一个值,该值指示指定的消息或缓冲消息是否满足表中至少一个筛选器的匹配条件,然后将匹配筛选器的 FilterData 添加到集合。

GetMatchingValues(MessageBuffer, ICollection<TFilterData>)

返回一个值,该值指示指定的消息缓冲区是否正好满足表中一个筛选器的匹配条件,以及是否将匹配筛选器的 FilterData 添加到 results 集合中。

注解

当预期有多个筛选器与消息或缓冲消息相匹配,并且只需要 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

参数

message
Message

要测试的 Message

results
ICollection<TFilterData>

存储泛型 ICollection<T><FilterData> 中匹配操作筛选器的 FilterData 的引用参数。

返回

Boolean

如果消息正好满足表中一个筛选器的匹配条件,则为 true;如果不满足任何筛选器,则为 false

实现

例外

resultsnull

筛选器试图检查消息正文的内容。

注解

当预期会有多个筛选器与消息相匹配,同时只需要 FilterData,且不检查消息正文时,请使用此方法。

匹配的 FilterData 对象的 MessageFilter 存储在 resultsICollection<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 满足的筛选器的筛选数据的引用参数。

返回

Boolean

如果缓冲消息正好满足表中一个 ActionMessageFilter 的匹配条件,则为 true;如果不满足任何筛选器,则为 false

实现

例外

resultsnull

注解

当预期有多个筛选器与缓冲消息相匹配,并且只需要 FilterData 时,请使用此方法。

FilterData匹配MessageFilter对象存储在 .results ICollection<T>

此方法实现 GetMatchingValues

适用于