/// <summary> /// Creates a new route. /// </summary> public virtual Route <TContext, TRequest, TResponse> Create(RoutableOptions <TContext, TRequest, TResponse> options) => new Route <TContext, TRequest, TResponse>(options);
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); }
protected internal Route(RoutableOptions <TContext, TRequest, TResponse> options) => RoutableOptions = options;
/// <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;