private IConnection ( ConnectionState oldState, ConnectionState newState ) : bool | ||
oldState | ConnectionState | |
newState | ConnectionState | |
return | bool |
bool IConnection.ChangeState(ConnectionState oldState, ConnectionState newState)
{
lock (_stateLock)
{
// If we're in the expected old state then change state and return true
if (_state == oldState)
{
Trace(TraceLevels.StateChanges, "ChangeState({0}, {1})", oldState, newState);
State = newState;
return true;
}
}
// Invalid transition
return false;
}
Connection::IConnection ( ) : void | |
Connection::IConnection ( |
|
Connection::IConnection ( IRequest request ) : void | |
Connection::IConnection ( JToken message ) : void |