IMessageFilterTable<TFilterData>.GetMatchingValues IMessageFilterTable<TFilterData>.GetMatchingValues IMessageFilterTable<TFilterData>.GetMatchingValues IMessageFilterTable<TFilterData>.GetMatchingValues Method

定义

将与指定的消息或缓冲消息相匹配筛选器的数据添加到集合。Adds the filter data of the filters that match the specified message or buffered message to a collection.

重载

GetMatchingValues(Message, ICollection<TFilterData>) GetMatchingValues(Message, ICollection<TFilterData>) GetMatchingValues(Message, ICollection<TFilterData>)

返回一个值,该值指示指定的消息是否满足表中至少一个筛选器的匹配条件,然后将匹配筛选器的 FilterData 添加到集合。Returns a value that indicates whether the match criterion of at least one filter in the table is satisfied by the specified message, and adds the FilterData of the matching filters to a collection.

GetMatchingValues(MessageBuffer, ICollection<TFilterData>) GetMatchingValues(MessageBuffer, ICollection<TFilterData>) GetMatchingValues(MessageBuffer, ICollection<TFilterData>) GetMatchingValues(MessageBuffer, ICollection<TFilterData>)

返回一个值,该值指示指定的缓冲消息是否满足表中至少一个筛选器的匹配条件,然后将匹配筛选器的 FilterData 添加到集合。Returns a value that indicates whether the match criterion of at least one filter in the table is satisfied by the specified buffered message, and adds the FilterData of the matching filters to a collection.

注解

当预期会有多个筛选器相匹配,并且只需要匹配筛选器数据时,请使用此方法。Use this method when more than one filter is expected to match and only the matching filter data is required. 这些方法会先返回一个指示是否找到匹配筛选器的布尔值,然后将所有匹配筛选器的数据放入集合。These methods return a boolean that indicates whether matching filters were found and put any matching filter data into a collection.

注意,请不要在添加结果之前清除包含筛选器数据的集合。Note that the collection that contains the filter data is not cleared before the results are added. 这样您就可以将多个筛选器表中所有匹配项累积添加到单个集合中。This allows you to accumulate all matches across multiple filter tables into a single collection.

如果不需要检查消息正文的内容,请使用 GetMatchingValuesUse GetMatchingValues if the contents of the message body do not require examination. 如果需要检查消息正文的内容,请使用 GetMatchingValuesUse GetMatchingValues if the contents of the message body requires examination.

GetMatchingValues(Message, ICollection<TFilterData>) GetMatchingValues(Message, ICollection<TFilterData>) GetMatchingValues(Message, ICollection<TFilterData>)

返回一个值,该值指示指定的消息是否满足表中至少一个筛选器的匹配条件,然后将匹配筛选器的 FilterData 添加到集合。Returns a value that indicates whether the match criterion of at least one filter in the table is satisfied by the specified message, and adds the FilterData of the matching filters to a collection.

public:
 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

参数

message
Message Message Message Message

要测试的 MessageThe Message to test.

results
ICollection<TFilterData>

在通用集合中存储匹配筛选器的筛选数据的引用参数。Reference parameter that stores the filter data of the matching filters in a generic collection.

返回

如果 message 满足表中至少一个筛选器的匹配条件,则为 true;如果不满足任何筛选器,则为 falsetrue if the match criterion of at least one filter in the table is satisfied by message; false if no filter is satisfied.

注解

当预期会有一个或多个筛选器与消息相匹配,同时只需要筛选器数据,且不检查消息正文的内容时,请使用此方法。Use this method when one or more filters are expected to match the message, only the filter data is required, and the contents of the body of the message are not to be inspected.

匹配的 MessageFilter 对象的筛选器数据存储在 results 参数中。The filter data of the matching MessageFilter objects is stored in the results parameter.

如果由筛选器表中的筛选器来检查消息的正文,请缓冲该消息,然后将它传递到该方法的 GetMatchingValues 版本。If the body of the message is inspected by a filter in the filter table, buffer the message and pass it to the GetMatchingValues version of the method.

GetMatchingValues(MessageBuffer, ICollection<TFilterData>) GetMatchingValues(MessageBuffer, ICollection<TFilterData>) GetMatchingValues(MessageBuffer, ICollection<TFilterData>) GetMatchingValues(MessageBuffer, ICollection<TFilterData>)

返回一个值,该值指示指定的缓冲消息是否满足表中至少一个筛选器的匹配条件,然后将匹配筛选器的 FilterData 添加到集合。Returns a value that indicates whether the match criterion of at least one filter in the table is satisfied by the specified buffered message, and adds the FilterData of the matching filters to a collection.

public:
 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
Public Function GetMatchingValues (buffer As MessageBuffer, results As ICollection(Of TFilterData)) As Boolean

参数

results
ICollection<TFilterData>

在泛型 ICollection<T><FilterData> 中存储匹配筛选器的筛选数据的引用参数。Reference parameter that stores the filter data of the matching filters in a generic ICollection<T><FilterData>.

返回

如果 messageBuffer 满足表中至少一个筛选器的匹配条件,则为 true;如果不满足任何筛选器,则为 falsetrue if the match criterion of at least one filter in the table is satisfied by messageBuffer; false if no filter is satisfied.

注解

当预期会有一个或多个筛选器与缓冲消息相匹配,且只需要筛选器数据,同时可能需要检查消息的正文时,请使用此方法。Use this method when one or more filters are expected to match the buffered message, only the filter data is required, and the body of the message may require inspection.

匹配的 MessageFilter 对象的筛选器数据存储在 results 参数中。The filter data of the matching MessageFilter objects is stored in the results parameter.

适用于