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>()); }
public StoreCreatingInterrupterModel(Store store, CreateArguments arguments) { Store = store; Arguments = arguments; }