ClientBase(TChannel) Class
TOC
Collapse the table of content
Expand the table of content

ClientBase<TChannel> Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Provides the base implementation used to create Windows Phone client objects (proxies) that can call services.

System::Object
  System.ServiceModel::ClientBase<TChannel>

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

No code example is currently available or this language may not be supported.

Type Parameters

TChannel

The channel used to connect to the service that identifies the type of service contract encapsulated by this proxy.

The ClientBase<TChannel> type exposes the following members.

  NameDescription
Protected methodClientBase<TChannel>()Initializes a new instance of the ClientBase<TChannel> class using the default target endpoint from the application configuration file.
Protected methodClientBase<TChannel>(String)Initializes a new instance of the ClientBase<TChannel> class using the configuration information specified in the application configuration file by endpointConfigurationName.
Protected methodClientBase<TChannel>(Binding, EndpointAddress)Initializes a new instance of the ClientBase<TChannel> class using a specified binding and target address.
Protected methodClientBase<TChannel>(String, EndpointAddress)Initializes a new instance of the ClientBase<TChannel> class using the specified target address and endpoint information.
Protected methodClientBase<TChannel>(String, String)Initializes a new instance of the ClientBase<TChannel> class.
Top

  NameDescription
Protected propertyChannelGets the inner channel used to communicate with the service.
Public propertyChannelFactoryGets the underlying ChannelFactory<TChannel> object.
Public propertyClientCredentialsGets the client credentials used to call an operation.
Public propertyEndpointGets the target endpoint for the service to which the Windows Phone client can connect.
Public propertyInnerChannelGets the underlying IClientChannel implementation.
Public propertyStateGets the current state of the ClientBase<TChannel> object.
Top

  NameDescription
Public methodAbortCauses the ClientBase<TChannel> object to transition immediately from its current state into the closed state.
Protected methodCreateChannelReturns a new channel from the client to the service.
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 the Object is reclaimed by garbage collection. (Inherited from Object.)
Protected methodGetDefaultValueForInitialization<T>Replicates the behavior of the default keyword in C#.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodInvokeAsyncProvides support for implementing the event-based asynchronous pattern. For more information about
this pattern, see Event-based Asynchronous Pattern Overview.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Explicit interface implemetationPrivate methodICommunicationObject::BeginClose(AsyncCallback, Object)Begins an asynchronous operation to close the ClientBase<TChannel>.
Explicit interface implemetationPrivate methodICommunicationObject::BeginClose(TimeSpan, AsyncCallback, Object)Begins an asynchronous operation to close the ClientBase<TChannel> with a specified time-out.
Explicit interface implemetationPrivate methodICommunicationObject::BeginOpen(AsyncCallback, Object)Begins an asynchronous operation to open the ClientBase<TChannel> object.
Explicit interface implemetationPrivate methodICommunicationObject::BeginOpen(TimeSpan, AsyncCallback, Object)Begins an asynchronous operation to open the ClientBase<TChannel> object within a specified interval of time.
Explicit interface implemetationPrivate methodICommunicationObject::Close()Causes the ClientBase<TChannel> object to transition from its current state into the closed state.
Explicit interface implemetationPrivate methodICommunicationObject::Close(TimeSpan)Causes the ClientBase<TChannel> object to transition from its current state into the closed state.
Explicit interface implemetationPrivate eventICommunicationObject::ClosedThe event handler that is invoked when the ClientBase<TChannel> object has transitioned from its current state to the closed state.
Explicit interface implemetationPrivate eventICommunicationObject::ClosingThe event handler that is invoked when the ClientBase<TChannel> object transitions from its current state to the closed state.
Explicit interface implemetationPrivate methodICommunicationObject::EndCloseCompletes an asynchronous operation to close the ClientBase<TChannel> object.
Explicit interface implemetationPrivate methodICommunicationObject::EndOpenCompletes an asynchronous operation to open the ClientBase<TChannel> object.
Explicit interface implemetationPrivate eventICommunicationObject::FaultedThe event handler that is invoked when a fault occurs while performing an operation on the ClientBase<TChannel> object.
Explicit interface implemetationPrivate methodICommunicationObject::Open()Causes the ClientBase<TChannel> object to transition from the created state into the opened state.
Explicit interface implemetationPrivate methodICommunicationObject::Open(TimeSpan)Causes the ClientBase<TChannel> object to transition from the created state into the opened state within a specified interval of time.
Explicit interface implemetationPrivate eventICommunicationObject::OpenedThe event handler that is invoked when the ClientBase<TChannel> object has transitioned from the created state to the opened state.
Explicit interface implemetationPrivate eventICommunicationObject::OpeningThe event handler that is invoked when the ClientBase<TChannel> object transitions from the created state to the opened state.
Top

Extend the ClientBase<TChannel> class to create a custom Windows Phone client object (proxy) that can be used to connect to a service.

The ClientBase<TChannel> class can be used quickly and easily by developers who prefer objects to the use of the interfaces and the System.ServiceModel::ChannelFactory<TChannel> class. In all cases this class wraps or exposes the methods and functionality of the System.ServiceModel::ChannelFactory<TChannel> class and the System.ServiceModel::IClientChannel interface.

Capabilities

If you use this API in your app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.

ID_CAP_NETWORKING

Windows Phone 8, Windows Phone OS 7.1

For more info, see App capabilities and hardware requirements for Windows Phone 8.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

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:
© 2017 Microsoft