12 references to MapWhen
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
ComponentsWebAssemblyApplicationBuilderExtensions.cs (1)
42
builder.
MapWhen
(ctx => ctx.Request.Path.StartsWithSegments(pathPrefix, out var rest) && rest.StartsWithSegments("/_framework") &&
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
Builder\HealthCheckApplicationBuilderExtensions.cs (1)
229
app.
MapWhen
(predicate, b => b.UseMiddleware<HealthCheckMiddleware>(args));
Microsoft.AspNetCore.Http.Abstractions.Tests (9)
MapPredicateMiddlewareTests.cs (9)
51
Assert.Throws<ArgumentNullException>(() => builder.
MapWhen
(null!, UseNotImplemented));
52
Assert.Throws<ArgumentNullException>(() => builder.
MapWhen
(NotImplementedPredicate, configuration: null!));
64
builder.
MapWhen
(TruePredicate, UseSuccess);
76
builder.
MapWhen
(TruePredicate, UseSuccess);
88
builder.
MapWhen
(FalsePredicate, UseNotImplemented);
100
builder.
MapWhen
(TruePredicate, map1 =>
102
map1.
MapWhen
((Predicate)FalsePredicate, UseNotImplemented);
103
map1.
MapWhen
((Predicate)TruePredicate, map2 => map2.
MapWhen
((Predicate)TruePredicate, UseSuccess));
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
2782
app.
MapWhen
(c => true, nested =>