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

            if (callToDriverDelegate == null)
            {
                return(ActionResult.GetErrorResult(new NotSupportedException()));
            }
            return(callToDriverDelegate(driverModel));
        }
예제 #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()));
            }
        }
예제 #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);
        }
예제 #4
0
 public DriverResponseModel(PedestrianProfileRequestModel request, DriverModel responseAuthor)
 {
     _responseAuthor = responseAuthor;
     _request        = request;
 }