StateValidator
Unified state transition validator for all state enums.
Métodos
IsActive(OrderStates) : bool
Determines if the OrderStates is an active (working) state.
- state
- State to check.
Retorna: true if state is active; otherwise false.
IsActive(SubscriptionStates) : bool
Determines if the SubscriptionStates is an active (working) state.
- state
- State to check.
Retorna: true if state is active; otherwise false.
IsActive(ChannelStates) : bool
Determines if the ChannelStates is an active (working) state.
- state
- State to check.
Retorna: true if state is active; otherwise false.
IsActive(SessionStates) : bool
Determines if the SessionStates is an active (working) state.
- state
- State to check.
Retorna: true if state is active; otherwise false.
IsStopped(ChannelStates) : bool
Determines if the ChannelStates is a stopped state.
- state
- State to check.
Retorna: true if state is stopped; otherwise false.
IsTerminal(OrderStates) : bool
Determines if the OrderStates is a terminal (final) state.
- state
- State to check.
Retorna: true if state is terminal; otherwise false.
IsTerminal(SubscriptionStates) : bool
Determines if the SubscriptionStates is a terminal (final) state.
- state
- State to check.
Retorna: true if state is terminal; otherwise false.
IsTerminal(SessionStates) : bool
Determines if the SessionStates is a terminal (final) state.
- state
- State to check.
Retorna: true if state is terminal; otherwise false.
IsValid(OrderStates, OrderStates) : bool
Check if transition from one OrderStates to another is valid.
- from
- Current state.
- to
- New state.
Retorna: true if transition is valid; otherwise false.
IsValid(ChannelStates, ChannelStates) : bool
Check if transition from one ChannelStates to another is valid.
- from
- Current state.
- to
- New state.
Retorna: true if transition is valid; otherwise false.
IsValid(SubscriptionStates, SubscriptionStates) : bool
Check if transition from one SubscriptionStates to another is valid.
- from
- Current state.
- to
- New state.
Retorna: true if transition is valid; otherwise false.
IsValid(SessionStates, SessionStates) : bool
Check if transition from one SessionStates to another is valid.
- from
- Current state.
- to
- New state.
Retorna: true if transition is valid; otherwise false.
Validate(OrderStates?, OrderStates, object, ILogReceiver, bool) : bool
Validate OrderStates transition with logging and optional exception.
- from
- Current state (null means initial state).
- to
- New state.
- context
- Context for error message (e.g., transaction id).
- logs
- Log receiver for warnings.
- throwOnInvalid
- If true, throws InvalidOperationException on invalid transition.
Retorna: true if transition is valid; otherwise false.
Validate(ChannelStates, ChannelStates, object, ILogReceiver, bool) : bool
Validate ChannelStates transition with logging and optional exception.
- from
- Current state.
- to
- New state.
- context
- Context for error message.
- logs
- Log receiver for warnings.
- throwOnInvalid
- If true, throws InvalidOperationException on invalid transition.
Retorna: true if transition is valid; otherwise false.
Validate(SubscriptionStates, SubscriptionStates, object, ILogReceiver, bool) : bool
Validate SubscriptionStates transition with logging and optional exception.
- from
- Current state.
- to
- New state.
- context
- Context for error message (e.g., subscription id).
- logs
- Log receiver for warnings.
- throwOnInvalid
- If true, throws InvalidOperationException on invalid transition.
Retorna: true if transition is valid; otherwise false.
Validate(SessionStates, SessionStates, object, ILogReceiver, bool) : bool
Validate SessionStates transition with logging and optional exception.
- from
- Current state.
- to
- New state.
- context
- Context for error message.
- logs
- Log receiver for warnings.
- throwOnInvalid
- If true, throws InvalidOperationException on invalid transition.
Retorna: true if transition is valid; otherwise false.