示例#1
0
            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);
            }
示例#2
0
 public static VclBackendHandlerState Get(VclBackendAction action)
 {
     return(KnownStates[action]);
 }