MessageFilterTable<TFilterData> MessageFilterTable<TFilterData> MessageFilterTable<TFilterData> MessageFilterTable<TFilterData> Class

定義

提供篩選資料表的泛型實作。Provides the generic implementation of a filter table.

generic <typename TFilterData>
public ref class MessageFilterTable : System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<System::ServiceModel::Dispatcher::MessageFilter ^, TFilterData>>, System::Collections::Generic::IDictionary<System::ServiceModel::Dispatcher::MessageFilter ^, TFilterData>, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::ServiceModel::Dispatcher::MessageFilter ^, TFilterData>>, System::ServiceModel::Dispatcher::IMessageFilterTable<TFilterData>
[System.Runtime.Serialization.DataContract]
public class MessageFilterTable<TFilterData> : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.ServiceModel.Dispatcher.MessageFilter,TFilterData>>, System.Collections.Generic.IDictionary<System.ServiceModel.Dispatcher.MessageFilter,TFilterData>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.ServiceModel.Dispatcher.MessageFilter,TFilterData>>, System.ServiceModel.Dispatcher.IMessageFilterTable<TFilterData>
type MessageFilterTable<'FilterData> = class
    interface IMessageFilterTable<'FilterData>
    interface IDictionary<MessageFilter, 'FilterData>
    interface ICollection<KeyValuePair<MessageFilter, 'FilterData>>
    interface seq<KeyValuePair<MessageFilter, 'FilterData>>
    interface IEnumerable
Public Class MessageFilterTable(Of TFilterData)
Implements ICollection(Of KeyValuePair(Of MessageFilter, TFilterData)), IDictionary(Of MessageFilter, TFilterData), IEnumerable(Of KeyValuePair(Of MessageFilter, TFilterData)), IMessageFilterTable(Of TFilterData)

類型參數

TFilterData

型別FilterData篩選相關聯。The type of the FilterData associated with the filter.

繼承
MessageFilterTable<TFilterData>MessageFilterTable<TFilterData>MessageFilterTable<TFilterData>MessageFilterTable<TFilterData>
屬性
實作

備註

MessageFilterTable<TFilterData> 接受任何類型的篩選條件。A MessageFilterTable<TFilterData> accepts filters of any type. 它會在內部將篩選條件分組至包含指定類型之任何篩選條件的資料表。It groups them internally into tables that contain all the filters of a given type. 當新增篩選條件時,該篩選條件會被置於包含其類型之篩選條件的內部篩選資料表中 (如果已經存在)。When a filter is added, it is put into an internal filter table, if one already exists, which contains filters of its type. 如果此資料表不存在,便會呼叫 CreateFilterTable 以配置適當類型的新篩選資料表。If no such table exists, CreateFilterTable is called to allocate a new filter table of the appropriate type. 它的預設作業是呼叫 CreateFilterTableIts default operation is to call CreateFilterTable.

您可以覆寫這個預設行為,以明確指定與篩選條件類型關聯的篩選資料表類型。This default behavior can be overridden to explicitly specify the type of filter table associated with a type of filter. 當篩選條件類型初次新增至資料表時,所建立的篩選資料表型別就會與篩選條件類型產生永久關聯。The first time a filter type is added to the table, the filter table type created is permanently associated with the filter type.

優先權是一個整數值,這個值可用來將篩選條件分組為優先權 Bucket,並且安排這些 Bucket 的處理順序。The priority is an integer value used to group filters into priority buckets and order their processing. 指派給篩選條件類型的整數愈大,處理時它的優先權就愈高。The larger the integer assigned to a filter type, the higher its priority for processing. 優先權 Bucket 中的所有篩選資料表都會一併進行評估。All the filter tables in a priority bucket are evaluated together. 只有當較高的優先權 Bucket 中不提供任何比對時,才會評估較低的優先權 Bucket。Lower priority buckets are only evaluated if higher priority buckets do not provide any matches. 篩選資料表會指派預設優先權,可以設定給正在新增的篩選條件。A filter table assigns a default priority that can be set to filters being added.

建構函式

MessageFilterTable<TFilterData>() MessageFilterTable<TFilterData>() MessageFilterTable<TFilterData>() MessageFilterTable<TFilterData>()

使用 0 的預設優先權,初始化 MessageFilterTable<TFilterData> 類別的新執行個體。Initializes a new instance of the MessageFilterTable<TFilterData> class with a default priority of 0.

MessageFilterTable<TFilterData>(Int32) MessageFilterTable<TFilterData>(Int32) MessageFilterTable<TFilterData>(Int32) MessageFilterTable<TFilterData>(Int32)

使用指定的初始預設優先權,初始化 MessageFilterTable<TFilterData> 類別的新執行個體。Initializes a new instance of the MessageFilterTable<TFilterData> class with the specified initial default priority.

屬性

Count Count Count Count

取得篩選資料表中篩選條件/FilterData 組的數目。Gets the number of filter/FilterData pairs in the filter table.

DefaultPriority DefaultPriority DefaultPriority DefaultPriority

取得或設定篩選資料表的預設優先權。Gets or sets the default priority for the filter table.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

取得值,這個值會指出篩選資料表是否為唯讀。Gets a value that indicates whether the filter table is read-only.

Item[MessageFilter] Item[MessageFilter] Item[MessageFilter] Item[MessageFilter]

取得或設定與指定之 filter 關聯的篩選資料。Gets or sets the filter data associated with the specified filter.

Keys Keys Keys Keys

取得包含在篩選資料表中所有篩選條件的集合。Gets a collection of all the filters contained in the filter table.

Values Values Values Values

取得包含在篩選資料表中所有 FilterData 的集合。Gets a collection of all the FilterData contained in the filter table.

方法

Add(KeyValuePair<MessageFilter,TFilterData>) Add(KeyValuePair<MessageFilter,TFilterData>) Add(KeyValuePair<MessageFilter,TFilterData>) Add(KeyValuePair<MessageFilter,TFilterData>)

將篩選/FilterData (索引鍵/值) 組加入至篩選資料表。Adds a filter/FilterData (key/value) pair to the filter table.

Add(MessageFilter, TFilterData) Add(MessageFilter, TFilterData) Add(MessageFilter, TFilterData) Add(MessageFilter, TFilterData)

將篩選條件及其關聯的 FilterData 新增至篩選資料表。Adds a filter and its associated FilterData to the filter table.

Add(MessageFilter, TFilterData, Int32) Add(MessageFilter, TFilterData, Int32) Add(MessageFilter, TFilterData, Int32) Add(MessageFilter, TFilterData, Int32)

使用指定的優先權,將篩選條件及其關聯的 FilterData 新增至動作篩選資料表。Adds a filter and its associated FilterData to the action filter table with a specified priority.

Clear() Clear() Clear() Clear()

從篩選資料表移除所有篩選條件及其關聯的資料。Removes all filters and their associated data from the filter table.

Contains(KeyValuePair<MessageFilter,TFilterData>) Contains(KeyValuePair<MessageFilter,TFilterData>) Contains(KeyValuePair<MessageFilter,TFilterData>) Contains(KeyValuePair<MessageFilter,TFilterData>)

判斷篩選資料表是否包含指定的篩選及其關聯的 FilterDataDetermines whether the filter table contains a specified filter and its associated FilterData.

ContainsKey(MessageFilter) ContainsKey(MessageFilter) ContainsKey(MessageFilter) ContainsKey(MessageFilter)

判斷篩選資料表是否包含指定的篩選條件。Determines whether the filter table contains a specified filter.

CopyTo(KeyValuePair<MessageFilter,TFilterData>[], Int32) CopyTo(KeyValuePair<MessageFilter,TFilterData>[], Int32) CopyTo(KeyValuePair<MessageFilter,TFilterData>[], Int32) CopyTo(KeyValuePair<MessageFilter,TFilterData>[], Int32)

將篩選/FilterData 組複製到從指定索引開始的陣列。Copies the filter/FilterData pairs to an array that starts at a specified index.

CreateFilterTable(MessageFilter) CreateFilterTable(MessageFilter) CreateFilterTable(MessageFilter) CreateFilterTable(MessageFilter)

產生指定類型之篩選的篩選資料表。Instantiates a filter table for a specified type of filter.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

傳回會逐一查看篩選資料表的列舉值。Returns an enumerator that iterates through the filter table.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetMatchingFilter(Message, MessageFilter) GetMatchingFilter(Message, MessageFilter) GetMatchingFilter(Message, MessageFilter) GetMatchingFilter(Message, MessageFilter)

傳回值,這個值表示指定的訊息是否剛好符合資料表中單一篩選條件的比對準則,並以 out 參數傳回該篩選條件。Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message and returns that filter in an out parameter.

GetMatchingFilter(MessageBuffer, MessageFilter) GetMatchingFilter(MessageBuffer, MessageFilter) GetMatchingFilter(MessageBuffer, MessageFilter) GetMatchingFilter(MessageBuffer, MessageFilter)

傳回值,這個值表示指定的訊息是否剛好符合資料表中單一篩選條件的比對準則,並以 out 參數傳回該篩選條件。Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message and returns that filter in an out parameter.

GetMatchingFilters(Message, ICollection<MessageFilter>) GetMatchingFilters(Message, ICollection<MessageFilter>) GetMatchingFilters(Message, ICollection<MessageFilter>) GetMatchingFilters(Message, ICollection<MessageFilter>)

傳回值,這個值會指出指定的訊息是否符合資料表中 MessageFilter 的比對準則,並且將相符的篩選條件新增至集合。Returns a value that indicates whether the match criterion of an MessageFilter in the table is satisfied by the specified message, and adds the matching filters to a collection.

GetMatchingFilters(MessageBuffer, ICollection<MessageFilter>) GetMatchingFilters(MessageBuffer, ICollection<MessageFilter>) GetMatchingFilters(MessageBuffer, ICollection<MessageFilter>) GetMatchingFilters(MessageBuffer, ICollection<MessageFilter>)

傳回值,這個值表示指定的經緩衝處理訊息是否符合資料表中至少一個篩選條件的比對準則,並且從其中至少找到一個相符條件之一組最高優先權篩選條件,將相符的篩選條件加入至集合。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 matching filters from the highest priority set of filters in which at least one match is found to a collection.

GetMatchingValue(Message, TFilterData) GetMatchingValue(Message, TFilterData) GetMatchingValue(Message, TFilterData) GetMatchingValue(Message, TFilterData)

傳回值,這個值表示指定的訊息是否剛好符合資料表中單一 MessageFilter 的比對準則,並且將相符的篩選資料加入至集合。Returns a value that indicates whether the match criterion of exactly one MessageFilter in the table is satisfied by the specified message and adds the matching filter data to a collection.

GetMatchingValue(MessageBuffer, TFilterData) GetMatchingValue(MessageBuffer, TFilterData) GetMatchingValue(MessageBuffer, TFilterData) GetMatchingValue(MessageBuffer, TFilterData)

傳回值,這個值表示指定的緩衝訊息是否剛好符合資料表中單一篩選的比對準則,並且將相符的篩選資料加入至集合。Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified buffered message and adds the matching filter data to a collection.

GetMatchingValues(Message, ICollection<TFilterData>) 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 or buffered 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 新增至 results 集合。Returns a value that indicates whether the match criterion of exactly one filter in the table is satisfied by the specified message buffer and adds the FilterData of the matching filters to the results collection.

GetPriority(MessageFilter) GetPriority(MessageFilter) GetPriority(MessageFilter) GetPriority(MessageFilter)

傳回資料表中指定之篩選條件的優先權。Returns the priority of a given filter in the table.

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(KeyValuePair<MessageFilter,TFilterData>) Remove(KeyValuePair<MessageFilter,TFilterData>) Remove(KeyValuePair<MessageFilter,TFilterData>) Remove(KeyValuePair<MessageFilter,TFilterData>)

從篩選資料表移除指定的篩選/FilterData 組。Removes a specified filter/FilterData pair from the filter table.

Remove(MessageFilter) Remove(MessageFilter) Remove(MessageFilter) Remove(MessageFilter)

從篩選資料表移除篩選及其關聯的 FilterDataRemoves a filter and its associated FilterData from the filter table.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
TryGetValue(MessageFilter, TFilterData) TryGetValue(MessageFilter, TFilterData) TryGetValue(MessageFilter, TFilterData) TryGetValue(MessageFilter, TFilterData)

檢查篩選條件是否儲存在篩選資料表中。Checks whether a filter is stored in the filter table.

明確介面實作

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

傳回會逐一查看篩選資料表的列舉值。Returns an enumerator that iterates through the filter table.

Extension Methods

CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>) CopyToDataTable<T>(IEnumerable<T>)

傳回DataTable,其中包含副本DataRow物件,指定輸入IEnumerable<T>物件其中泛型參數TDataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

複本DataRow至指定的物件DataTable,根據輸入IEnumerable<T>物件其中泛型參數TDataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

複本DataRow至指定的物件DataTable,根據輸入IEnumerable<T>物件其中泛型參數TDataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

篩選的項目IEnumerable根據指定的型別。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

將轉換IEnumerableIQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>) Ancestors<T>(IEnumerable<T>)

傳回包含來源集合中每個節點祖系的項目集合。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName) Ancestors<T>(IEnumerable<T>, XName)

傳回包含來源集合中每個節點祖系的已篩選項目集合。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>) DescendantNodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目之子代節點的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>) Descendants<T>(IEnumerable<T>)

傳回包含來源集合中每個項目和文件之子代項目的項目集合。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName) Descendants<T>(IEnumerable<T>, XName)

傳回已篩選的項目集合,其中包含來源集合中每個項目和文件的子代項目。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>) Elements<T>(IEnumerable<T>)

傳回來源集合中每個項目和文件的子項目集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName) Elements<T>(IEnumerable<T>, XName)

傳回來源集合中每個項目和文件的已篩選子項目集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中只會包含具有相符之 XName 的項目。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>) InDocumentOrder<T>(IEnumerable<T>)

傳回包含來源集合中所有節點的節點集合,依據文件順序來排序。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>) Nodes<T>(IEnumerable<T>)

傳回來源集合中每個文件和項目的子節點集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>) Remove<T>(IEnumerable<T>)

在來源集合中,從每一個節點的父節點移除這些節點。Removes every node in the source collection from its parent node.

適用於