예제 #1
0
 public VersionMiddleware(
     RequestDelegate next,
     VersionMiddlewareConfigurationOptions options
     )
 {
     _next    = next;
     _options = options;
 }
예제 #2
0
        public static IApplicationBuilder UseVersioning(this IApplicationBuilder builder,
                                                        Action <VersionMiddlewareConfigurationOptions> options = null)
        {
            var opt = new VersionMiddlewareConfigurationOptions();

            options?.Invoke(opt);

            return(builder.UseMiddleware <VersionMiddleware>(opt));
        }