public RetrieveStateMachineMiddleware(IStateMachineActivator stateMachineActivator, RetrieveStateMachineOptions options = null)
 {
     _stateMachineActivator = stateMachineActivator ?? throw new ArgumentNullException(nameof(stateMachineActivator));
     ModelIdFunc            = options?.ModelIdFunc ?? (context => context.Get(StateMachineKey.ModelId, Guid.NewGuid()));
     StateMachineTypeFunc   = options?.StateMachineTypeFunc ?? (context => context.Get <Type>(StateMachineKey.Type));
     StateMachineFunc       = options?.StateMachineFunc;
     PostExecuteAction      = options?.PostExecuteAction;
 }
 public RetrieveStateMachineMiddleware(IStateMachineActivator stateMachineRepo, RetrieveStateMachineOptions options = null)
 {
     _stateMachineRepo    = stateMachineRepo;
     ModelIdFunc          = options?.ModelIdFunc ?? (context => context.Get(StateMachineKey.ModelId, Guid.NewGuid()));
     StateMachineTypeFunc = options?.StateMachineTypeFunc ?? (context => context.Get <Type>(StateMachineKey.Type));
     StateMachineFunc     = options?.StateMachineFunc;
     PostExecuteAction    = options?.PostExecuteAction;
 }
Ejemplo n.º 3
0
 public PersistModelMiddleware(IStateMachineActivator stateMachineRepo)
 {
     _stateMachineRepo = stateMachineRepo;
 }
Ejemplo n.º 4
0
 public PersistModelMiddleware(IStateMachineActivator stateMachineActivator)
 {
     _stateMachineActivator = stateMachineActivator ?? throw new ArgumentNullException(nameof(stateMachineActivator));
 }