Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new route.
 /// </summary>
 public virtual Route <TContext, TRequest, TResponse> Create(RoutableOptions <TContext, TRequest, TResponse> options) => new Route <TContext, TRequest, TResponse>(options);
Ejemplo n.º 2
0
 public static RoutableOptions <TContext, TRequest, TResponse> WithJsonSupport <TContext, TRequest, TResponse>(this RoutableOptions <TContext, TRequest, TResponse> @this)
     where TContext : RoutableContext <TContext, TRequest, TResponse>
     where TRequest : RoutableRequest <TContext, TRequest, TResponse>
     where TResponse : RoutableResponse <TContext, TRequest, TResponse>
 {
     @this.ResponseTypeHandlers.Add(typeof(JObject), JsonResponseTypeHandlers.JsonResponseTypeHandler <TContext, TRequest, TResponse>);
     return(@this);
 }
Ejemplo n.º 3
0
 protected internal Route(RoutableOptions <TContext, TRequest, TResponse> options) => RoutableOptions = options;
Ejemplo n.º 4
0
 /// <summary>
 /// Create a new routing collection
 /// </summary>
 /// <param name="options">Options to apply to this routing collection</param>
 public Routing(RoutableOptions <TContext, TRequest, TResponse> options) => Options = options;