public ActionResult CallToDriver(DriverModel driverModel) { Func <DriverModel, ActionResult> callToDriverDelegate = CallToDriverDelegate; if (callToDriverDelegate == null) { return(ActionResult.GetErrorResult(new NotSupportedException())); } return(callToDriverDelegate(driverModel)); }
public ActionResult <PedestrianProfileRequestModel> InitRequest(DriverModel driver) { Func <DriverModel, Logic.PedestrianProfileRequestLogic> initRequestDelegate = InitRequestDelegate; if (initRequestDelegate != null) { Logic.PedestrianProfileRequestLogic logic = initRequestDelegate(driver); return(logic == null ? ActionResult <PedestrianProfileRequestModel> .GetErrorResult(new KeyNotFoundException()) : ActionResult <PedestrianProfileRequestModel> .GetValidResult(logic.Model)); } else { return(ActionResult <PedestrianProfileRequestModel> .GetErrorResult(new NotSupportedException())); } }
//internal Func<ActionResult<IEnumerable<Logic.DriverResponseLogic>>> EnumerateAvailableResponsesDelegate; internal PedestrianProfileRequestModel(PedestrianProfileModel user, DriverModel responseAuthor) { _user = user; _response = new DriverResponseModel(this, responseAuthor); //_availableResponses = new SimpleCollectionLoadDecorator<DriverResponseModel>(EnumerateAvailableResponses); }
public DriverResponseModel(PedestrianProfileRequestModel request, DriverModel responseAuthor) { _responseAuthor = responseAuthor; _request = request; }