/// <summary> /// Updates the platform state to the new state and fires an event to all listeners informing them of the state change /// </summary> private void UpdateAcdPlatformState(AcdPlatformState newState) { AcdPlatformState oldState = _acdPlatformState; lock (_syncRoot) { switch (newState) { case ContactCenter.AcdPlatformState.Created: _acdPlatformState = newState; break; case ContactCenter.AcdPlatformState.Starting: if (_acdPlatformState == ContactCenter.AcdPlatformState.Created) { _acdPlatformState = newState; } break; case ContactCenter.AcdPlatformState.Started: if (_acdPlatformState == ContactCenter.AcdPlatformState.Starting) { _acdPlatformState = newState; } break; case ContactCenter.AcdPlatformState.Terminating: if (_acdPlatformState == ContactCenter.AcdPlatformState.Started) { _acdPlatformState = newState; } break; case ContactCenter.AcdPlatformState.Terminated: if (_acdPlatformState == ContactCenter.AcdPlatformState.Terminating) { _acdPlatformState = newState; } break; } } _acdPlatformState = newState; if (StateChanged != null) { StateChanged(this, new AcdPlatformStateChangedEventArgs (oldState, newState)); } }
internal AcdPlatformStateChangedEventArgs(AcdPlatformState previousState, AcdPlatformState newState) { _previousState = previousState; _newState = newState; }
public AcdPlatform() { _portals = new List <AcdPortal>(); _acdPlatformState = AcdPlatformState.Created; }