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