This topic has not yet been rated - Rate this topic

ChannelFactoryBase<TChannel> Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Provides a common base implementation for channel factories on the client to create channels of a specified type connected to a specified address.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)
public abstract class ChannelFactoryBase<TChannel> : ChannelFactoryBase, 
	IChannelFactory<TChannel>, IChannelFactory, ICommunicationObject

Type Parameters

TChannel

The type of channel the factory produces.

The ChannelFactoryBase<TChannel> type exposes the following members.

  Name Description
Protected method Supported by Portable Class Library ChannelFactoryBase<TChannel>() Initializes a new instance of the ChannelFactoryBase<TChannel> class.
Protected method Supported by Portable Class Library ChannelFactoryBase<TChannel>(IDefaultCommunicationTimeouts) Initializes a new instance of the ChannelFactoryBase<TChannel> class with the default communication timeouts specified.
Top
  Name Description
Protected property Supported by Portable Class Library DefaultCloseTimeout Gets the default interval of time provided for a close operation to complete. (Inherited from ChannelFactoryBase.)
Protected property Supported by Portable Class Library DefaultOpenTimeout Gets the default interval of time provided for an open operation to complete. (Inherited from ChannelFactoryBase.)
Protected property Supported by Portable Class Library DefaultReceiveTimeout Gets the default interval of time provided for a receive operation to complete. (Inherited from ChannelFactoryBase.)
Protected property Supported by Portable Class Library DefaultSendTimeout Gets the default interval of time provided for a send operation to complete. (Inherited from ChannelFactoryBase.)
Protected property Supported by Portable Class Library IsDisposed Gets a value that indicates whether the communication object has been disposed. (Inherited from CommunicationObject.)
Public property Supported by Portable Class Library State Gets a value that indicates the current state of the communication object. (Inherited from CommunicationObject.)
Protected property Supported by Portable Class Library ThisLock Gets the mutually exclusive lock that protects the class instance during a state transition. (Inherited from CommunicationObject.)
Top
  Name Description
Public method Supported by Portable Class Library Abort Causes a communication object to transition immediately from its current state into the closing state. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library BeginClose(AsyncCallback, Object) Begins an asynchronous operation to close a communication object. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library BeginClose(TimeSpan, AsyncCallback, Object) Begins an asynchronous operation to close a communication object with a specified timeout. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library BeginOpen(AsyncCallback, Object) Begins an asynchronous operation to open a communication object. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library BeginOpen(TimeSpan, AsyncCallback, Object) Begins an asynchronous operation to open a communication object within a specified interval of time. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library Close() Causes a communication object to transition from its current state into the closed state. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library Close(TimeSpan) Causes a communication object to transition from its current state into the closed state within a specified interval of time. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library CreateChannel(EndpointAddress) Creates a particular type of channel with a specified endpoint address.
Public method Supported by Portable Class Library CreateChannel(EndpointAddress, Uri) Creates a particular type of channel with specified transport and endpoint addresses.
Public method Supported by Portable Class Library EndClose Completes an asynchronous operation to close a communication object. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library EndOpen Completes an asynchronous operation to open a communication object. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Supported by Portable Class Library Fault Causes a communication object to transition from its current state into the faulted state. (Inherited from CommunicationObject.)
Protected method Supported by Portable Class Library Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected method Supported by Portable Class Library GetCommunicationObjectType Gets the type of communication object. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method Supported by Portable Class Library GetProperty<T> Returns a typed object requested, if present, from the appropriate layer in the channel stack. (Inherited from ChannelFactoryBase.)
Public method Supported by Portable Class Library GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method Supported by Portable Class Library MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method Supported by Portable Class Library OnAbort Aborts each channel managed by the channel factory. (Overrides ChannelFactoryBase.OnAbort().)
Protected method Supported by Portable Class Library OnBeginClose Begins an asynchronous operation to close all the channels associated with the channel factory within a specified interval of time. (Overrides ChannelFactoryBase.OnBeginClose(TimeSpan, AsyncCallback, Object).)
Protected method Supported by Portable Class Library OnBeginOpen Inserts processing on a communication object after it transitions to the opening state due to the invocation of an asynchronous open operation. (Inherited from CommunicationObject.)
Protected method Supported by Portable Class Library OnClose Closes all the channels associated with the channel factory within a specified interval of time. (Overrides ChannelFactoryBase.OnClose(TimeSpan).)
Protected method Supported by Portable Class Library OnClosed Invoked during the transition of a communication object into the closing state. (Inherited from CommunicationObject.)
Protected method Supported by Portable Class Library OnClosing Invoked during the transition of a communication object into the closing state. (Inherited from CommunicationObject.)
Protected method Supported by Portable Class Library OnCreateChannel When implemented in a derived class, provides an extensibility point when creating channels.
Protected method Supported by Portable Class Library OnEndClose Completes an asynchronous operation to close all the channels associated with the channel factory within a specified interval of time. (Overrides ChannelFactoryBase.OnEndClose(IAsyncResult).)
Protected method Supported by Portable Class Library OnEndOpen Completes an asynchronous operation on the open of a communication object. (Inherited from CommunicationObject.)
Protected method Supported by Portable Class Library OnFaulted Inserts processing on a communication object after it transitions to the faulted state due to the invocation of a synchronous fault operation. (Inherited from CommunicationObject.)
Protected method Supported by Portable Class Library OnOpen Inserts processing on a communication object after it transitions into the opening state which must complete within a specified interval of time. (Inherited from CommunicationObject.)
Protected method Supported by Portable Class Library OnOpened Invoked during the transition of a communication object into the opened state. (Inherited from CommunicationObject.)
Protected method Supported by Portable Class Library OnOpening Invoked during the transition of a communication object into the opening state. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library Open() Causes a communication object to transition from the created state into the opened state. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library Open(TimeSpan) Causes a communication object to transition from the created state into the opened state within a specified interval of time. (Inherited from CommunicationObject.)
Protected method ThrowIfDisposed Throws an exception if the communication object is disposed. (Inherited from CommunicationObject.)
Protected method ThrowIfDisposedOrImmutable Throws an exception if the communication object the State property is not set to the Created state. (Inherited from CommunicationObject.)
Protected method ThrowIfDisposedOrNotOpen Throws an exception if the communication object is not in the Opened state. (Inherited from CommunicationObject.)
Public method Supported by Portable Class Library ToString Returns a string that represents the current object. (Inherited from Object.)
Protected method Supported by Portable Class Library ValidateCreateChannel Confirms that the channel factory is opened and ready to create channels.
Top
  Name Description
Public event Supported by Portable Class Library Closed Occurs when a communication object transitions into the closed state. (Inherited from CommunicationObject.)
Public event Supported by Portable Class Library Closing Occurs when a communication object transitions into the closing state. (Inherited from CommunicationObject.)
Public event Supported by Portable Class Library Faulted Occurs when a communication object transitions into the faulted state. (Inherited from CommunicationObject.)
Public event Supported by Portable Class Library Opened Occurs when a communication object transitions into the opened state. (Inherited from CommunicationObject.)
Public event Supported by Portable Class Library Opening Occurs when a communication object transitions into the opening state. (Inherited from CommunicationObject.)
Top
  Name Description
Explicit interface implemetation Private property Supported by Portable Class Library IDefaultCommunicationTimeouts.CloseTimeout Gets the interval of time after which the close method, invoked by a communication object, times out. (Inherited from ChannelManagerBase.)
Explicit interface implemetation Private property Supported by Portable Class Library IDefaultCommunicationTimeouts.OpenTimeout Gets the interval of time after which the open method, invoked by a communication object, times out. (Inherited from ChannelManagerBase.)
Explicit interface implemetation Private property Supported by Portable Class Library IDefaultCommunicationTimeouts.ReceiveTimeout Gets the interval of time after which the receive method, invoked by a communication object, times out. (Inherited from ChannelManagerBase.)
Explicit interface implemetation Private property Supported by Portable Class Library IDefaultCommunicationTimeouts.SendTimeout Gets the interval of time after which the send method, invoked by a communication object, times out. (Inherited from ChannelManagerBase.)
Top

The channels created by channel factories on the client are accepted on the server by channel listeners. Once the channel connection is established between client and service, they can communicate by exchanging messages.

The CreateChannel uses the specified address as the destination for outgoing messages. The ServiceAddress.Uri property is used as the To header in the message. The ServiceReference.Via property is used as the physical destination to send messages to. This is typically the same as the ServiceAddress.Uri value.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Windows 8 Consumer Preview, Windows Server 8 Beta, Windows 7, Windows Server 2008 SP2, 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.
Did you find this helpful?
(1500 characters remaining)