namespace DIT.Workflower.DependencyInjection.Abstractions; public interface IWorkflow where TState : struct where TCommand : struct { string Id { get; } int Version { get; } string Reference => $"{Id}.v{Version}"; /// /// Retrieves all transition definitions for the workflow. /// /// The type of the workflow state. /// The type of the workflow command. /// The type of the workflow context. /// A list of transition definitions. public List> GetAllTransitionDefinitions(); /// /// Gets a list of allowed transitions without any condition checks. /// /// The incoming state /// A list of available transitions public List> GetAllowedTransitions(TState from); /// /// Gets a list of allowed transitions evaluated for the current context. /// /// The given context /// The incoming state /// A list of available transitions for the current context public List> GetAllowedTransitions(TContext context, TState from); /// /// Retrieves a list of allowed transitions based on the provided request. /// /// The type of the workflow state. /// The type of the workflow command. /// The request object containing the necessary information. /// An enumerable of allowed transitions. public IEnumerable> GetAllowedTransitions(ListTransitionsRequest request); }