ChannelDispatcherCollection Class
Provides a thread-safe collection that contains channel dispatchers.
System.Collections.Generic::SynchronizedCollection<ChannelDispatcherBase>
System.ServiceModel.Dispatcher::ChannelDispatcherCollection
Assembly: System.ServiceModel (in System.ServiceModel.dll)
The ChannelDispatcherCollection type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Count | Gets the number of elements contained in the thread-safe collection. (Inherited from SynchronizedCollection<T>.) |
![]() | Item | Gets an element from the thread-safe collection with a specified index. (Inherited from SynchronizedCollection<T>.) |
![]() | Items | Gets the list of elements contained in the thread-safe collection. (Inherited from SynchronizedCollection<T>.) |
![]() | SyncRoot | Gets the object used to synchronize access to the thread-safe collection. (Inherited from SynchronizedCollection<T>.) |
| Name | Description | |
|---|---|---|
![]() | Add | Adds an item to the thread-safe, read-only collection. (Inherited from SynchronizedCollection<T>.) |
![]() | Clear | Removes all items from the collection. (Inherited from SynchronizedCollection<T>.) |
![]() | ClearItems | Removes all channel dispatchers from the collection. (Overrides SynchronizedCollection<T>::ClearItems().) |
![]() | Contains | Determines whether the collection contains an element with a specific value. (Inherited from SynchronizedCollection<T>.) |
![]() | CopyTo | Copies the elements of the collection to a specified array, starting at a particular index. (Inherited from SynchronizedCollection<T>.) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetEnumerator | Returns an enumerator that iterates through the synchronized collection. (Inherited from SynchronizedCollection<T>.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | IndexOf | Returns the index of the first occurrence of a value in the collection. (Inherited from SynchronizedCollection<T>.) |
![]() | Insert | Inserts an item into the collection at a specified index. (Inherited from SynchronizedCollection<T>.) |
![]() | InsertItem | Inserts a channel dispatcher into the collection at a specified index. (Overrides SynchronizedCollection<T>::InsertItem(Int32, T).) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | Remove | Removes the first occurrence of a specified item from the collection. (Inherited from SynchronizedCollection<T>.) |
![]() | RemoveAt | Removes an item at a specified index from the collection. (Inherited from SynchronizedCollection<T>.) |
![]() | RemoveItem | Removes a channel dispatcher at a specified index from the collection. (Overrides SynchronizedCollection<T>::RemoveItem(Int32).) |
![]() | SetItem | Replaces the channel dispatcher at a specified index with another item. (Overrides SynchronizedCollection<T>::SetItem(Int32, T).) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | ICollection::CopyTo | Copies the elements of the collection to a specified array, starting at a particular index. (Inherited from SynchronizedCollection<T>.) |
![]() ![]() | ICollection<T>::IsReadOnly | Gets a value that indicates whether the collection is read only. (Inherited from SynchronizedCollection<T>.) |
![]() ![]() | ICollection::IsSynchronized | Gets a value that indicates whether the collection is thread safe. (Inherited from SynchronizedCollection<T>.) |
![]() ![]() | ICollection::SyncRoot | Gets the object used to synchronize access to the thread-safe collection. (Inherited from SynchronizedCollection<T>.) |
![]() ![]() | IEnumerable::GetEnumerator | Returns an enumerator that iterates through the synchronized collection. (Inherited from SynchronizedCollection<T>.) |
![]() ![]() | IList::Add | Adds an element to the collection. (Inherited from SynchronizedCollection<T>.) |
![]() ![]() | IList::Contains | Determines whether the collection contains an element with a specific value. (Inherited from SynchronizedCollection<T>.) |
![]() ![]() | IList::IndexOf | Determines the zero-based index of an element in the collection. (Inherited from SynchronizedCollection<T>.) |
![]() ![]() | IList::Insert | Inserts an object into the collection at a specified index. (Inherited from SynchronizedCollection<T>.) |
![]() ![]() | IList::IsFixedSize | Gets a value that indicates whether the collection is fixed in size. (Inherited from SynchronizedCollection<T>.) |
![]() ![]() | IList::IsReadOnly | Gets a value that indicates whether the collection is read only. (Inherited from SynchronizedCollection<T>.) |
![]() ![]() | IList::Item | Gets or sets the item at a specified zero-based index. (Inherited from SynchronizedCollection<T>.) |
![]() ![]() | IList::Remove | Removes the first occurrence of a specified object as an element from the collection. (Inherited from SynchronizedCollection<T>.) |
This collection is used by ServiceHostBase to manage the channel dispatchers associated with the host. A ChannelDispatcherCollection is created when ServiceHostBase is called and the collection can be accessed using the ChannelDispatchers property.
The collection contains ChannelDispatcherBase objects (and not just instances of ChannelDispatcher) because it is also used by developers who want to keep the programming model but replace the system-provided runtime. They derive a class from ChannelDispatcherBase and extend ServiceHost (which inherits from ServiceHostBase) by overriding InitializeRuntime, adding instances of the class derived from ChannelDispatcherBase to ChannelDispatchers.
This class has no public constructors and is not intended to be used outside of the ServiceHost.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

