Ejemplo n.º 1
0
 public JsonqlMiddleware(
     JsonqlOptions jsonqlOptions,
     string routeTemplate)
 {
     this.jsonqlOptions = jsonqlOptions ?? throw new ArgumentNullException(nameof(jsonqlOptions));
     this.routeTemplate = routeTemplate ?? throw new ArgumentNullException(nameof(routeTemplate));
 }
Ejemplo n.º 2
0
 public JsonqlTesterSchemaMIddleware(
     JsonqlOptions jsonqlOptions,
     JsonqlTesterOptions jsonqlTesterOptions,
     string jsonSchemaPath)
 {
     this.jsonqlOptions       = jsonqlOptions;
     this.jsonqlTesterOptions = jsonqlTesterOptions;
     this.jsonSchemaPath      = jsonSchemaPath;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="next"></param>
 /// <param name="jsonqlOptions"></param>
 /// <param name="jsonqlTesterOptions"></param>
 /// <param name="jsonSchemaPath"></param>
 public JsonqlTesterSchemaMIddleware(
     RequestDelegate next,
     IOptions <JsonqlOptions> jsonqlOptions,
     JsonqlTesterOptions jsonqlTesterOptions,
     string jsonSchemaPath)
 {
     this.next                = next;
     this.jsonqlOptions       = jsonqlOptions.Value;
     this.jsonqlTesterOptions = jsonqlTesterOptions;
     this.requestMatcher      = new TemplateMatcher(TemplateParser.Parse(jsonSchemaPath), new RouteValueDictionary());
 }
Ejemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="next"></param>
        /// <param name="jsonqlOptions"></param>
        /// <param name="routeTemplate"></param>
        public JsonqlMiddleware(
            RequestDelegate next,
            IOptions <JsonqlOptions> jsonqlOptions,
            string routeTemplate)
        {
            this.next = next ?? throw new ArgumentNullException(nameof(next));

            if (jsonqlOptions == null)
            {
                throw new ArgumentNullException(nameof(jsonqlOptions));
            }
            this.jsonqlOptions = jsonqlOptions.Value;

            this.routeTemplate = routeTemplate ?? throw new ArgumentNullException(nameof(routeTemplate));
        }