/// <summary> /// This middleware is a collection of all the middleware features that are provided by Nexus Link. Use <paramref name="options"/> /// to specify exactly how they should behave. /// </summary> /// <param name="next">The inner handler</param> /// <param name="options">Options that controls which features to use and how they should behave.</param> public NexusLinkMiddleware(RequestDelegate next, NexusLinkMiddlewareOptions options) { InternalContract.RequireValidated(options, nameof(options)); Next = next; Options = options; }
/// <summary> /// This middleware is a collection of all the middleware features that are provided by Nexus Link. Use <paramref name="options"/> /// to specify exactly how they should behave. /// </summary> /// <param name="next">The inner handler</param> /// <param name="options">Options that controls which features to use and how they should behave.</param> public NexusLinkMiddleware(RequestDelegate next, IOptions <NexusLinkMiddlewareOptions> options) { InternalContract.RequireNotNull(options.Value, nameof(options)); InternalContract.RequireValidated(options.Value, nameof(options)); Next = next; Options = options.Value; }
/// <summary> /// This middleware is a collection of all the middleware features that are provided by Nexus Link. Use <paramref name="options"/> /// to specify exactly how they should behave. /// </summary> /// <param name="builder">"this"</param> /// <param name="options">Options that controls which features to use and how they should behave.</param> public static IApplicationBuilder UseNexusLinkMiddleware(this IApplicationBuilder builder, NexusLinkMiddlewareOptions options) { return(builder.UseMiddleware <NexusLinkMiddleware>(options)); }