ICommunicationObject Interface
TOC
Collapse the table of content
Expand the table of content

ICommunicationObject Interface

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

Defines the contract for the basic state machine for all communication-oriented objects in the system, including channels, the channel managers, factories, listeners, and dispatchers, and service hosts.

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

public interface ICommunicationObject

The ICommunicationObject type exposes the following members.

  NameDescription
Public propertyStateGets the current state of the communication-oriented object.
Top

  NameDescription
Public methodAbortCauses a communication object to transition immediately from its current state into the closed state.
Public methodBeginClose(AsyncCallback, Object)Begins an asynchronous operation to close a communication object.
Public methodBeginClose(TimeSpan, AsyncCallback, Object)Begins an asynchronous operation to close a communication object with a specified time-out.
Public methodBeginOpen(AsyncCallback, Object)Begins an asynchronous operation to open a communication object.
Public methodBeginOpen(TimeSpan, AsyncCallback, Object)Begins an asynchronous operation to open a communication object within a specified interval of time.
Public methodClose()Causes a communication object to transition from its current state into the closed state.
Public methodClose(TimeSpan)Causes a communication object to transition from its current state into the closed state.
Public methodEndCloseCompletes an asynchronous operation to close a communication object.
Public methodEndOpenCompletes an asynchronous operation to open a communication object.
Public methodOpen()Causes a communication object to transition from the created state into the opened state.
Public methodOpen(TimeSpan)Causes a communication object to transition from the created state into the opened state within a specified interval of time.
Top

  NameDescription
Public eventClosedOccurs when the communication object completes its transition from the closing state into the closed state.
Public eventClosingOccurs when the communication object first enters the closing state.
Public eventFaultedOccurs when the communication object first enters the faulted state.
Public eventOpenedOccurs when the communication object completes its transition from the opening state into the opened state.
Public eventOpeningOccurs when the communication object first enters the opening state.
Top

The ICommunicationObject interface defines:

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

Show:
© 2017 Microsoft