Exemple #1
0
        public ActionResult CallToDriver(DriverModel driverModel)
        {
            Func <DriverModel, ActionResult> callToDriverDelegate = CallToDriverDelegate;

            if (callToDriverDelegate == null)
            {
                return(ActionResult.GetErrorResult(new NotSupportedException()));
            }
            return(callToDriverDelegate(driverModel));
        }
Exemple #2
0
        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()));
            }
        }
Exemple #3
0
        //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;
 }