System.ServiceModel 4.0.0.0 System.ServiceModel.Channels.CommunicationObject System.IDisposable System.ServiceModel.Channels.IChannelFactory

Channel factories that implement the interface and their associated channels are generally used by the initiators of a communication pattern. Listener factories that implement the interface and their associated listeners provide the mechanisms with which channels are accepted for communications.

This class is not part of the channel model, but of the service model. The method provides the means to create an for a service endpoint. Use it to construct a client that hooks up to an interface contract on the service without using metadata or policy.

Setting ChannelFactory.Credentials.Windows.AllowedImpersonationLevel to TokenImpersonationLevel.Anonymous always results in an anonymous logon regardless of impersonation level.

Special note for Managed C++ users deriving from this class:

Put your cleanup code in (On)(Begin)Close (and/or OnAbort), not in a destructor.

Avoid destructors; they cause the compiler to auto-generate .

Avoid non-reference members; they can cause the compiler to auto-generate .

Avoid using a finalizer; but if you include one, you should suppress the build warning and call and the finalizer itself from (On)(Begin)Close (and/or OnAbort) to emulate what would have been the auto-generated behavior.

When adding behaviors programmatically, the behavior is added to the appropriate Behaviors property on the prior to the creation of any channel. See the example section for a code sample.

Creates and manages the channels that are used by clients to send messages to service endpoints.

- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class.

- Method
  4.0.0.0
  System.Void `` To be added.

  If is null, only the behaviors specified in the service endpoint are loaded. If the wildcard, "*", is used, any endpoint configuration in the client configuration file is used, but only if there is precisely one. Otherwise an exception is thrown. Any other value for the , including the empty string "", matches the endpoint configuration with the same name. See the WCF Client Configuration topic for a discussion of the client configuration.

  Initializes the channel factory with the behaviors provided by a specified configuration file and with those in the service endpoint of the channel factory.

- Method
  4.0.0.0
  System.ServiceModel.Description.ServiceEndpoint To be added.

  When implemented in a derived class, creates a description of the service endpoint associated with the channel factory.

  The associated with the channel factory.

- Method
  4.0.0.0
  System.ServiceModel.Channels.IChannelFactory To be added.

  Builds the channel factory for the current endpoint of the factory.

  An for the endpoint of the current factory.

- Property
  4.0.0.0
  System.ServiceModel.Description.ClientCredentials To be added.

  The object is stored as a type of endpoint behavior and can be accessed through the property.

  The method initializes a read-only copy of the object for the factory.

  The object is used by the class (or a class that derives from this class) to create the proxy objects that can call services. The object is also accessible through the property.

  Setting ChannelFactory.Credentials.Windows.AllowedImpersonationLevel to TokenImpersonationLevel.Anonymous always results in an anonymous logon regardless of impersonation level.

  Gets the credentials used by clients to communicate a service endpoint over the channels produced by the factory.

- Property
  4.0.0.0
  System.TimeSpan To be added.

  Gets the default service model close time-out if both the and are null. The default value for the service model close time-out is 1 minute. Otherwise, the value is set to the value associated with the .

  Gets the default interval of time provided for a close operation to complete.

- Property
  4.0.0.0
  System.TimeSpan To be added.

  Gets the default service model open time-out if both the and are null. The default value for the service model open time-out is 1 minute. Otherwise, the value is set to the value associated with the .

  Gets the default interval of time provided for an open operation to complete.

- Property
  4.0.0.0
  System.ServiceModel.Description.ServiceEndpoint To be added. To be added.

  Gets the service endpoint to which the channels produced by the factory connect.

- Method
  4.0.0.0
  System.Void

  Before opening the channel factory, checks that it is not , , or .

  Opens the current channel factory if it is not yet opened.

- Method
  4.0.0.0
  T ReferenceTypeConstraint

  Use this to retrieve capabilities, requirements and parameters from the channel stack. If a channel factory supports returning the requested object, it returns it. If not, it delegates the call down to the next level in the stack. If it gets to the bottom of the stack and no channel factory supported the requested object, then the method returns null.

  is typically some channel interface that the channel factory can support. If, for example, GetProperty<IChannelListener> is called on a duplex channel factory, it returns the underlying listener.

  Returns the typed object requested, if present, from the appropriate layer in the channel stack, or null if not present.

  The typed object requested if it is present or null if it is not.

  The typed object for which the method is querying.
- Method
  4.0.0.0
  System.Void ``

  Use if you have just the binding. Use if you have the configuration.

  Initializes the service endpoint of the channel factory with a specified endpoint.

  The to initialize the channel factory with.
- Method
  4.0.0.0
  System.Void `` `` To be added.

  Use if you have the configuration.

  Initializes the service endpoint of the channel factory with a specified binding and address.

  The with which to initialize the channel factory.
- Method
  4.0.0.0
  System.Void `` `` To be added. To be added.

  Use if you have just the binding.

  Initializes the service endpoint of the channel factory with a specified address and configuration.

- Method
  4.0.0.0
  System.Void

  The method is called on a factory after it transitions to the closing state if the method is invoked.

  Terminates the inner channel factory of the current channel factory.

- Method
  4.0.0.0
  System.IAsyncResult `` `` ``

  This method receives notification, through a callback, of the identity of the event handler for the operation. The operation is not complete until either the asynchronous close on the inner channel factory returns or the time-out occurs.

  Begins an asynchronous close operation on the inner channel factory of the current channel factory that has a state object associated with it.

  The that references the asynchronous operation.

  The that specifies how long the operation has to complete before timing out. The delegate that receives the notification of the asynchronous operation completion. An object, specified by the application, that contains state information associated with the asynchronous operation.
- Method
  4.0.0.0
  System.IAsyncResult `` `` ``

  This method receives notification, through a callback, of the identity of the event handler for the operation. The operation is not complete until either the asynchronous open on the inner channel factory returns or the time-out occurs.

  Begins an asynchronous open operation on the inner channel factory of the current channel factory that has a state object associated with it.

  The that references the asynchronous operation.

  The that specifies how long the operation has to complete before timing out. The delegate that receives the notification of the asynchronous operation completion. An object, specified by the application, that contains state information associated with the asynchronous operation.
- Method
  4.0.0.0
  System.Void `` To be added.

  Calls close on the inner channel factory with a specified time-out for the completion of the operation.

  The that specifies how long the operation has to complete before timing out.
- Method
  4.0.0.0
  System.Void `` To be added.

  Completes an asynchronous close operation on the inner channel factory of the current channel factory.

  The returned by a call to the method.
- Method
  4.0.0.0
  System.Void `` To be added.

  Completes an asynchronous open operation on the inner channel factory of the current channel factory.

  The returned by a call to the method.
- Method
  4.0.0.0
  System.Void `` To be added.

  Calls open on the inner channel factory of the current channel factory with a specified time-out for the completion of the operation.

  The that specifies how long the open operation has to complete before timing out.
- Method
  4.0.0.0
  System.Void

  Overrides and invokes the method, which is called during the transition of an object into the opened state. The object is stored as a type of endpoint behavior and can be accessed through the property.

  Initializes a read-only copy of the object for the channel factory.

- Method
  4.0.0.0
  System.Void To be added.

  Builds the inner channel factory for the current channel.

- Method
  4.0.0.0
  System.Void To be added.

  Closes the current channel factory.