Exemple #1
0
        private Validation <IError, Unit> DispatchCreating(Store store)
        {
            var args = new CreateArguments();
            var i    = new StoreCreatingInterrupterModel(store, args);
            //var g = storeCreateInterrupters.Aggregate(i, (model, interrupter) => InterrupterDispatcher.Dispatch(interrupter, model));
            var iResult = InterrupterDispatcher.Dispatch(storeCreateInterrupters, i);

            if (iResult.Arguments.IsCanceled)
            {
                // TODO: return reason
                //Fail(args.Reason)
                return(null);
            }

            // TODO: return unit
            return(new Validation <IError, Unit>());
        }
Exemple #2
0
 public StoreCreatingInterrupterModel(Store store, CreateArguments arguments)
 {
     Store     = store;
     Arguments = arguments;
 }