21 references to UseMiddleware
Microsoft.AspNetCore.Http.Abstractions (1)
Extensions\UseMiddlewareExtensions.cs (1)
39return app.UseMiddleware(typeof(TMiddleware), args);
Microsoft.AspNetCore.Http.Abstractions.Tests (20)
UseMiddlewareTest.cs (20)
16var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareNoParametersStub))); 30var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareAsyncNoParametersStub))); 44var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareNonTaskReturnStub))); 58var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareAsyncNonTaskReturnStub))); 72var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareNoInvokeStub))); 85var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareMultipleInvokesStub))); 98var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareMultipleInvokeAsyncStub))); 111var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareMultipleInvokeAndInvokeAsyncStub))); 124builder.UseMiddleware(typeof(MiddlewareInjectInvokeNoService)); 138builder.UseMiddleware(typeof(MiddlewareKeyedInjectInvoke)); 152builder.UseMiddleware(typeof(MiddlewareKeyedConstructorInjectInvoke)); 163builder.UseMiddleware(typeof(MiddlewareKeyedInjectInvoke)); 175builder.UseMiddleware(typeof(MiddlewareInjectInvoke)); 186builder.UseMiddleware(typeof(MiddlewareKeyedInjectInvoke)); 197builder.UseMiddleware(typeof(MiddlewareKeyedConstructorInjectInvoke)); 207builder.UseMiddleware(typeof(MiddlewareInjectWithOutAndRefParams)); 216var exception = Assert.Throws<NotSupportedException>(() => builder.UseMiddleware(typeof(Middleware), "arg")); 225builder.UseMiddleware(typeof(Middleware)); 242builder.UseMiddleware(typeof(Middleware)); 265builder.UseMiddleware(typeof(Middleware));