public RouteAction Handle(ICall call) { if (_callResults.HasResultFor(call)) { return(RouteAction.Return(_callResults.GetResult(call))); } return(RouteAction.Continue()); }
public RouteAction Handle(ICall call) { if (_callResults.HasResultFor(call)) { return(RouteAction.Return(_callResults.GetResult(call))); } var type = call.GetReturnType(); var compatibleProviders = _autoValueProviders.Where(x => x.CanProvideValueFor(type)).FirstOrNothing(); return(compatibleProviders.Fold( RouteAction.Continue, ReturnValueUsingProvider(call, type))); }