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

Definition

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)

Type Parameters

TFilterData

The type of the FilterData associated with the filter.

Inheritance
MessageFilterTable<TFilterData>MessageFilterTable<TFilterData>MessageFilterTable<TFilterData>MessageFilterTable<TFilterData>
Attributes
Implements

Remarks

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. If no such table exists, CreateFilterTable is called to allocate a new filter table of the appropriate type. Its 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.

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. All the filter tables in a priority bucket are evaluated together. 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.

Constructors

MessageFilterTable<TFilterData>() MessageFilterTable<TFilterData>() MessageFilterTable<TFilterData>() 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)

Initializes a new instance of the MessageFilterTable<TFilterData> class with the specified initial default priority.

Properties

Count Count Count Count

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]

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

Gets a collection of all the FilterData contained in the filter table.

Methods

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

Adds a filter/FilterData (key/value) pair to the filter table.

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

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)

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>)

Determines 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)

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)

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)

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>)

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)

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>)

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>)

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()

Gets the Type of the current instance.

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

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>)

Removes a specified filter/FilterData pair from the filter table.

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

Removes 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.

Explicit Interface Implementations

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>)

Returns 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)

Copies 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)

Copies 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)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(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)

Converts 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. 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. 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. 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.

Applies to