WCF is all about communication objects – channels, listeners, factories, all implement the ICommunicationObject interface (some through the CommunicationObject class). This provides a base implementation for the basic state machine states and transitions common to all communication-oriented object.
At any given point in time, the communication objects find themselves in a CommunicationState. Here is a diagram with the states and the transitions:
When we look at a communication object in a debugger, we see something like this (some columns and internal objects removed for brevity reasons):
Name: System.ServiceModel.Channels.ServiceChannel
Fields:
public enum CommunicationState { Created = 0, Opening = 1, Opened = 2, Closing = 3, Closed = 4, Faulted = 5 }
So in our case, the ServiceChannel is Opened. We could identify the state by looking at the other variable – if close called or aborted was called, we can only by in state 4 or 5 and so on. But the cheat sheet makes it simple.
Hope you find it useful!