IMessageFilterTable<TFilterData>.GetMatchingValues 方法

定義

將符合指定訊息或緩衝訊息之篩選條件的篩選資料加入至集合。

多載

GetMatchingValues(Message, ICollection<TFilterData>)

傳回值,這個值會指出指定的訊息是否符合資料表中至少一個篩選條件的比對準則,並且將相符篩選條件的 FilterData 加入至集合。

GetMatchingValues(MessageBuffer, ICollection<TFilterData>)

傳回值,這個值會指出指定的緩衝訊息是否符合資料表中至少一個篩選條件的比對準則,並且將相符篩選條件的 FilterData 加入至集合。

備註

當預期有一個以上的篩選條件相符,而且只需要取得相符的篩選資料時,便可使用這個方法。 這些方法會傳回布林值,由這個值指出是否已找到相符的篩選條件,並且將任何相符的篩選資料加入至集合。

請注意,包含篩選資料的集合在結果加入之前不會進行清除。 這樣可讓您將多個篩選資料表中的所有符合項目累積成為單一集合。

如果不需要檢查訊息本文的內容,便可使用 GetMatchingValues。 如果需要檢查訊息本文的內容,便可使用 GetMatchingValues

GetMatchingValues(Message, ICollection<TFilterData>)

傳回值,這個值會指出指定的訊息是否符合資料表中至少一個篩選條件的比對準則,並且將相符篩選條件的 FilterData 加入至集合。

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
Public Function GetMatchingValues (message As Message, results As ICollection(Of TFilterData)) As Boolean

參數

message
Message

要測試的 Message

results
ICollection<TFilterData>

參考參數,它會將相符篩選條件的篩選資料儲存到泛型集合。

傳回

Boolean

如果 true 符合資料表中至少一個篩選條件的比對準則,則為 message,如果沒有符合任何篩選條件,則為 false

備註

當預期有一個以上的篩選條件與訊息相符,只需要取得篩選資料,以及訊息本文內容不需要進行檢查時,便可使用這個方法。

相符 MessageFilter 物件的篩選資料會儲存在 results 參數中。

如果訊息本文會由篩選資料表中的篩選條件進行檢查,請緩衝該訊息並將它傳遞至 GetMatchingValues 版本的方法。

適用於

GetMatchingValues(MessageBuffer, ICollection<TFilterData>)

傳回值,這個值會指出指定的緩衝訊息是否符合資料表中至少一個篩選條件的比對準則,並且將相符篩選條件的 FilterData 加入至集合。

public:
 bool GetMatchingValues(System::ServiceModel::Channels::MessageBuffer ^ messageBuffer, System::Collections::Generic::ICollection<TFilterData> ^ results);
public:
 bool GetMatchingValues(System::ServiceModel::Channels::MessageBuffer ^ buffer, System::Collections::Generic::ICollection<TFilterData> ^ results);
public bool GetMatchingValues (System.ServiceModel.Channels.MessageBuffer messageBuffer, 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
abstract member GetMatchingValues : System.ServiceModel.Channels.MessageBuffer * System.Collections.Generic.ICollection<'FilterData> -> bool
Public Function GetMatchingValues (messageBuffer As MessageBuffer, results As ICollection(Of TFilterData)) As Boolean
Public Function GetMatchingValues (buffer As MessageBuffer, results As ICollection(Of TFilterData)) As Boolean

參數

messageBufferbuffer
MessageBuffer

要測試的 MessageBuffer

results
ICollection<TFilterData>

參考參數,將相符篩選條件的篩選資料儲存在泛型的 ICollection<T><FilterData> 中。

傳回

Boolean

如果 true 符合資料表中至少一個篩選條件的比對準則,則為 messageBuffer,如果沒有符合任何篩選條件,則為 false

備註

當預期有一個以上的篩選條件與緩衝訊息相符,只需要取得篩選資料,以及訊息本文不需要進行檢查時,便可使用這個方法。

相符 MessageFilter 物件的篩選資料會儲存在 results 參數中。

適用於