Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

CommunicationObject Class

Provides a common base implementation for the basic state machine common to all communication-oriented objects in the system, including channels and the channel factories.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)
public abstract class CommunicationObject : ICommunicationObject

The CommunicationObject type exposes the following members.

  NameDescription
Protected methodSupported by Silverlight for Windows PhoneCommunicationObject()Initializes a new instance of the CommunicationObject class.
Protected methodSupported by Silverlight for Windows PhoneCommunicationObject(Object)Initializes a new instance of the CommunicationObject class with the mutually exclusive lock to protect the state transitions specified.
Top
  NameDescription
Protected propertySupported by Silverlight for Windows PhoneDefaultCloseTimeoutWhen overridden in a derived class, gets the default interval of time provided for a close operation to complete.
Protected propertySupported by Silverlight for Windows PhoneDefaultOpenTimeoutWhen overridden in a derived class, gets the default interval of time provided for an open operation to complete.
Protected propertySupported by Silverlight for Windows PhoneIsDisposedGets a value that indicates whether the communication object has been disposed.
Public propertySupported by Silverlight for Windows PhoneStateGets a value that indicates the current state of the communication object.
Protected propertySupported by Silverlight for Windows PhoneThisLockGets the mutually exclusive lock that protects the class instance during a state transition.
Top
  NameDescription
Public methodSupported by Silverlight for Windows PhoneAbortCauses a communication object to transition immediately from its current state into the closing state.
Public methodSupported by Silverlight for Windows PhoneBeginClose(AsyncCallback, Object)Begins an asynchronous operation to close a communication object.
Public methodSupported by Silverlight for Windows PhoneBeginClose(TimeSpan, AsyncCallback, Object)Begins an asynchronous operation to close a communication object with a specified timeout.
Public methodSupported by Silverlight for Windows PhoneBeginOpen(AsyncCallback, Object)Begins an asynchronous operation to close a communication object.
Public methodSupported by Silverlight for Windows PhoneBeginOpen(TimeSpan, AsyncCallback, Object)Begins an asynchronous operation to close a communication object within a specified interval of time.
Public methodSupported by Silverlight for Windows PhoneClose()Causes a communication object to transition from its current state into the closed state.
Public methodSupported by Silverlight for Windows PhoneClose(TimeSpan)Causes a communication object to transition from its current state into the closed state within a specified interval of time.
Public methodSupported by Silverlight for Windows PhoneEndCloseCompletes an asynchronous operation to close a communication object.
Public methodSupported by Silverlight for Windows PhoneEndOpenCompletes an asynchronous operation to open a communication object.
Public methodSupported by Silverlight for Windows PhoneEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneFaultCauses a communication object to transition from its current state into the faulted state.
Protected methodSupported by Silverlight for Windows PhoneFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneGetCommunicationObjectTypeGets the type of communication object.
Public methodSupported by Silverlight for Windows PhoneGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneOnAbortWhen implemented in a derived class, inserts processing on a communication object after it transitions to the closing state due to the invocation of a synchronous abort operation.
Protected methodSupported by Silverlight for Windows PhoneOnBeginCloseWhen implemented in a derived class, inserts processing after a communication object transitions to the closing state due to the invocation of an asynchronous close operation.
Protected methodSupported by Silverlight for Windows PhoneOnBeginOpenWhen implemented in a derived class, inserts processing on a communication object after it transitions to the opening state due to the invocation of an asynchronous open operation.
Protected methodSupported by Silverlight for Windows PhoneOnCloseWhen implemented in a derived class, inserts processing on a communication object after it transitions to the closing state due to the invocation of a synchronous close operation.
Protected methodSupported by Silverlight for Windows PhoneOnClosedInvoked during the transition of a communication object into the closing state.
Protected methodSupported by Silverlight for Windows PhoneOnClosingInvoked during the transition of a communication object into the closing state.
Protected methodSupported by Silverlight for Windows PhoneOnEndCloseWhen implemented in a derived class, completes an asynchronous operation on the close of a communication object.
Protected methodSupported by Silverlight for Windows PhoneOnEndOpenWhen implemented in a derived class, completes an asynchronous operation on the open of a communication object.
Protected methodSupported by Silverlight for Windows PhoneOnFaultedInserts processing on a communication object after it transitions to the faulted state due to the invocation of a synchronous fault operation.
Protected methodSupported by Silverlight for Windows PhoneOnOpenWhen implemented in a derived class, inserts processing on a communication object after it transitions into the opening state which must complete within a specified interval of time.
Protected methodSupported by Silverlight for Windows PhoneOnOpenedInvoked during the transition of a communication object into the opened state.
Protected methodSupported by Silverlight for Windows PhoneOnOpeningInvoked during the transition of a communication object into the opening state.
Public methodSupported by Silverlight for Windows PhoneOpen()Causes a communication object to transition from the created state into the opened state.
Public methodSupported by Silverlight for Windows PhoneOpen(TimeSpan)Causes a communication object to transition from the created state into the opened state within a specified interval of time.
Protected methodSupported by Silverlight for Windows PhoneThrowIfDisposedThrows an exception if the communication object is disposed.
Protected methodSupported by Silverlight for Windows PhoneThrowIfDisposedOrImmutableThrows an exception if the communication object the State property is not set to the Created state.
Protected methodSupported by Silverlight for Windows PhoneThrowIfDisposedOrNotOpenThrows an exception if the communication object is not in the Opened state.
Public methodSupported by Silverlight for Windows PhoneToStringReturns a string that represents the current object. (Inherited from Object.)
Top
  NameDescription
Public eventSupported by Silverlight for Windows PhoneClosedOccurs when a communication object transitions into the closed state.
Public eventSupported by Silverlight for Windows PhoneClosingOccurs when a communication object transitions into the closing state.
Public eventSupported by Silverlight for Windows PhoneFaultedOccurs when a communication object transitions into the faulted state.
Public eventSupported by Silverlight for Windows PhoneOpenedOccurs when a communication object transitions into the opened state.
Public eventSupported by Silverlight for Windows PhoneOpeningOccurs when a communication object transitions into the opening state.
Top

The CommunicationObject class implements the ICommunicationObject interface for all communication objects inSilverlight 5. The method implementations handle parameter validation, raise events that notify the occurrence of state transitions, provide the means to associated additional processing with these state transitions, and ensure that such state changes are coordinated.

The state machine implemented for communication-oriented objects in Silverlight 5 is the same as the state machine implemented for communication-oriented objects in Windows Communication Foundation (WCF). For a discussion of states and transitions between states, see Understanding State Changes

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

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)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.