protected virtual void SwitchState(VclHandler handler, VclBackendAction action) { if (!ValidTransitionStates.Contains(action)) { throw new InvalidOperationException($"Invalid attempt to transition back-end from {State} to {action}."); } handler.Logger?.LogDebug($"Backend state transition from {State} to {action}"); handler._currentBackendState = VclBackendHandlerStateFactory.Get(action); }
public static VclBackendHandlerState Get(VclBackendAction action) { return(KnownStates[action]); }