Export (0) Print
Expand All

ChannelDispatcherCollection Class

Provides a thread-safe collection that contains channel dispatchers.

System.Object
  System.Collections.Generic.SynchronizedCollection<ChannelDispatcherBase>
    System.ServiceModel.Dispatcher.ChannelDispatcherCollection

Namespace:  System.ServiceModel.Dispatcher
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public class ChannelDispatcherCollection : SynchronizedCollection<ChannelDispatcherBase>

The ChannelDispatcherCollection type exposes the following members.

  NameDescription
Public propertyCountGets the number of elements contained in the thread-safe collection. (Inherited from SynchronizedCollection<T>.)
Public propertyItemGets an element from the thread-safe collection with a specified index. (Inherited from SynchronizedCollection<T>.)
Protected propertyItemsGets the list of elements contained in the thread-safe collection. (Inherited from SynchronizedCollection<T>.)
Public propertySyncRootGets the object used to synchronize access to the thread-safe collection. (Inherited from SynchronizedCollection<T>.)
Top

  NameDescription
Public methodAddAdds an item to the thread-safe, read-only collection. (Inherited from SynchronizedCollection<T>.)
Public methodClearRemoves all items from the collection. (Inherited from SynchronizedCollection<T>.)
Protected methodClearItemsRemoves all channel dispatchers from the collection. (Overrides SynchronizedCollection<T>.ClearItems().)
Public methodContainsDetermines whether the collection contains an element with a specific value. (Inherited from SynchronizedCollection<T>.)
Public methodCopyToCopies the elements of the collection to a specified array, starting at a particular index. (Inherited from SynchronizedCollection<T>.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetEnumeratorReturns an enumerator that iterates through the synchronized collection. (Inherited from SynchronizedCollection<T>.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodIndexOfReturns the index of the first occurrence of a value in the collection. (Inherited from SynchronizedCollection<T>.)
Public methodInsertInserts an item into the collection at a specified index. (Inherited from SynchronizedCollection<T>.)
Protected methodInsertItemInserts a channel dispatcher into the collection at a specified index. (Overrides SynchronizedCollection<T>.InsertItem(Int32, T).)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRemoveRemoves the first occurrence of a specified item from the collection. (Inherited from SynchronizedCollection<T>.)
Public methodRemoveAtRemoves an item at a specified index from the collection. (Inherited from SynchronizedCollection<T>.)
Protected methodRemoveItemRemoves a channel dispatcher at a specified index from the collection. (Overrides SynchronizedCollection<T>.RemoveItem(Int32).)
Protected methodSetItemReplaces the channel dispatcher at a specified index with another item. (Overrides SynchronizedCollection<T>.SetItem(Int32, T).)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Explicit interface implemetationPrivate methodICollection.CopyToCopies the elements of the collection to a specified array, starting at a particular index. (Inherited from SynchronizedCollection<T>.)
Explicit interface implemetationPrivate propertyICollection<T>.IsReadOnlyGets a value that indicates whether the collection is read only. (Inherited from SynchronizedCollection<T>.)
Explicit interface implemetationPrivate propertyICollection.IsSynchronizedGets a value that indicates whether the collection is thread safe. (Inherited from SynchronizedCollection<T>.)
Explicit interface implemetationPrivate propertyICollection.SyncRootGets the object used to synchronize access to the thread-safe collection. (Inherited from SynchronizedCollection<T>.)
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorReturns an enumerator that iterates through the synchronized collection. (Inherited from SynchronizedCollection<T>.)
Explicit interface implemetationPrivate methodIList.AddAdds an element to the collection. (Inherited from SynchronizedCollection<T>.)
Explicit interface implemetationPrivate methodIList.ContainsDetermines whether the collection contains an element with a specific value. (Inherited from SynchronizedCollection<T>.)
Explicit interface implemetationPrivate methodIList.IndexOfDetermines the zero-based index of an element in the collection. (Inherited from SynchronizedCollection<T>.)
Explicit interface implemetationPrivate methodIList.InsertInserts an object into the collection at a specified index. (Inherited from SynchronizedCollection<T>.)
Explicit interface implemetationPrivate propertyIList.IsFixedSizeGets a value that indicates whether the collection is fixed in size. (Inherited from SynchronizedCollection<T>.)
Explicit interface implemetationPrivate propertyIList.IsReadOnlyGets a value that indicates whether the collection is read only. (Inherited from SynchronizedCollection<T>.)
Explicit interface implemetationPrivate propertyIList.ItemGets or sets the item at a specified zero-based index. (Inherited from SynchronizedCollection<T>.)
Explicit interface implemetationPrivate methodIList.RemoveRemoves the first occurrence of a specified object as an element from the collection. (Inherited from SynchronizedCollection<T>.)
Top

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 Windows Communication Foundation (WCF) 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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft