Esempio n. 1
0
 public FormFlowInstanceProvider(
     IUserInstanceStateProvider stateProvider,
     IActionContextAccessor actionContextAccessor)
 {
     _stateProvider         = stateProvider ?? throw new ArgumentNullException(nameof(stateProvider));
     _actionContextAccessor = actionContextAccessor ?? throw new ArgumentNullException(nameof(actionContextAccessor));
 }
Esempio n. 2
0
 public FormFlowInstanceFactory(
     FormFlowDescriptor flowDescriptor,
     ActionContext actionContext,
     IUserInstanceStateProvider stateProvider)
 {
     _flowDescriptor = flowDescriptor ?? throw new ArgumentNullException(nameof(flowDescriptor));
     _actionContext  = actionContext ?? throw new ArgumentNullException(nameof(actionContext));
     _stateProvider  = stateProvider ?? throw new ArgumentNullException(nameof(stateProvider));
 }
Esempio n. 3
0
 private protected FormFlowInstance(
     IUserInstanceStateProvider stateProvider,
     string key,
     FormFlowInstanceId instanceId,
     Type stateType,
     object state,
     IReadOnlyDictionary <object, object> properties,
     bool completed = false)
 {
     _stateProvider = stateProvider ?? throw new ArgumentNullException(nameof(stateProvider));
     Key            = key ?? throw new ArgumentNullException(nameof(key));
     StateType      = stateType ?? throw new ArgumentNullException(nameof(stateType));
     InstanceId     = instanceId;
     Properties     = properties ?? throw new ArgumentNullException(nameof(properties));
     State          = state ?? throw new ArgumentNullException(nameof(state));
     Completed      = completed;
 }
Esempio n. 4
0
        public static FormFlowInstance Create(
            IUserInstanceStateProvider stateProvider,
            string key,
            FormFlowInstanceId instanceId,
            Type stateType,
            object state,
            IReadOnlyDictionary <object, object> properties,
            bool completed = false)
        {
            var genericType = typeof(FormFlowInstance <>).MakeGenericType(stateType);

            return((FormFlowInstance)Activator.CreateInstance(
                       genericType,
                       stateProvider,
                       key,
                       instanceId,
                       state,
                       properties,
                       completed));
        }
Esempio n. 5
0
 public InstanceModelBinder(IUserInstanceStateProvider stateProvider)
 {
     _stateProvider = stateProvider ?? throw new ArgumentNullException(nameof(stateProvider));
 }