public Func <object, object> CreateBindingDelegate(Type requestType, ServiceRequestBinderContext context) { IServiceRequestBinder binder = this.serviceRequestBinders.FirstOrDefault(x => x.CanCreateBindingDelegateFor(requestType)); if (binder == null) { throw new ArgumentException( "Type " + requestType + " cannot be bound from a request to a DTO as its type is unknown", "requestType"); } return(binder.CreateBindingDelegate(requestType, context)); }
public RouteRegistrar( RouteTableBuilder routeTableBuilder, RouteDispatchBuilder routeDispatchBuilder, Func <Type, object> serviceFactory, IServiceRequestBinder requestMessageBinder, IServiceMethodInvocation serviceMethodInvocation) : this( routeTableBuilder, routeDispatchBuilder, builder => builder .WithServiceFactory(serviceFactory) .WithServiceMethodInvocation(serviceMethodInvocation) .WithRequestMessageBinder(requestMessageBinder)) { }
public RouteRegistrar( RouteTableBuilder routeTableBuilder, RouteDispatchBuilder routeDispatchBuilder, Func<Type, object> serviceFactory, IServiceRequestBinder requestMessageBinder, IServiceMethodInvocation serviceMethodInvocation): this( routeTableBuilder, routeDispatchBuilder, builder => builder .WithServiceFactory(serviceFactory) .WithServiceMethodInvocation(serviceMethodInvocation) .WithRequestMessageBinder(requestMessageBinder)) { }
public RouteDispatchBuilder WithRequestMessageBinder(IServiceRequestBinder requestMessageBinder) { this.dispatchContext.RequestMessageBinder = requestMessageBinder; return(this); }
public RouteDispatchBuilder WithRequestMessageBinder(IServiceRequestBinder requestMessageBinder) { this.dispatchContext.RequestMessageBinder = requestMessageBinder; return this; }