1 override of Items
Microsoft.AspNetCore.Http (1)
391 references to Items
BasicWebSite (2)
Microsoft.AspNetCore.Antiforgery (3)
Microsoft.AspNetCore.Authentication.Test (10)
Microsoft.AspNetCore.Authorization.Policy (1)
Microsoft.AspNetCore.Components.Endpoints (5)
Microsoft.AspNetCore.Components.Endpoints.Tests (5)
Microsoft.AspNetCore.Cors (1)
Microsoft.AspNetCore.Diagnostics (2)
Microsoft.AspNetCore.Diagnostics.Tests (12)
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Microsoft.AspNetCore.Hosting (3)
Microsoft.AspNetCore.Http (2)
Microsoft.AspNetCore.Http.Abstractions.Tests (21)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Http.Extensions.Tests (190)
RequestDelegateFactoryTests.cs (44)
85httpContext.Items.Add("invoked", true);
127httpContext.Items.Add("invoked", true);
159httpContext.Items.Add("invoked", _invokedValue);
219httpContext.Items.Add("input", value);
224httpContext.Items.Add("input", value);
229httpContext.Items.Add("input", (object?)value ?? "Null");
234httpContext.Items.Add("input", value);
246httpContext.Items["input"] = id;
302httpContext.Items["tryParsable"] = tryParsable;
354httpContext.Items["tryParsable"] = tryParsable;
611httpContext.Items["tryParsable"] = tryParsable;
645context.Items["headers"] = headerValues;
646context.Items["query"] = queryValues;
647context.Items["form"] = formValues;
673context.Items["headers"] = headerValues;
674context.Items["query"] = queryValues;
675context.Items["form"] = formValues;
697httpContext.Items["myAwaitedBindAsyncRecord"] = myAwaitedBindAsyncRecord;
698httpContext.Items["myAwaitedBindAsyncStruct"] = myAwaitedBindAsyncStruct;
787httpContext.Items.Add("body", todo);
792httpContext.Items.Add("body", todo);
797httpContext.Items.Add("body", todo);
802args.HttpContext.Items.Add("body", args.Todo);
821args.HttpContext.Items.Add("body", args.Todo);
1045httpContext.Items.Add("service", myService);
1050args.HttpContext.Items.Add("service", args.MyService);
1055httpContext.Items.Add("service", myServices.Single());
1060httpContext.Items.Add("service", myService);
1079httpContext.Items.Add("service", myService);
1084args.HttpContext.Items.Add("service", args.MyService);
1089httpContext.Items.Add("service", myServices.Single());
1094httpContext.Items.Add("service", myService);
1602context.Items["uri"] = myBindAsyncRecord.Uri;
1606context.Items["uri"] = myBindAsyncRecord?.Uri;
1610context.Items["uri"] = myBindAsyncRecord?.Uri;
1614context.Items["uri"] = mySimpleBindAsyncRecord.Uri;
1619context.Items["uri"] = myNullableBindAsyncStruct.Uri;
1623context.Items["uri"] = myNullableBindAsyncStruct?.Uri;
1627context.Items["uri"] = myNullableBindAsyncStruct?.Uri;
1631context.Items["uri"] = mySimpleBindAsyncStruct.Uri;
2122context.Items.Add("foo", args.Foo);
2206context.Items["invoked"] = true;
3090var @delegate = (string name, HttpContext context) => context.Items.Add("param", name);
3589httpContext.Items["calls"] = _calls;
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (5)
179Assert.NotEmpty(httpContext.Items);
180Assert.Equal(expectedParameterValue, httpContext.Items["tryParsable"]);
774Assert.Equal(new[] { 1, 2, 3 }, (int[])httpContext.Items["query"]!);
775Assert.Equal(new[] { 4, 5, 6 }, (int[])httpContext.Items["headers"]!);
776Assert.Equal(new[] { 7, 8, 9 }, (int[])httpContext.Items["form"]!);
RequestDelegateGenerator\RequestDelegateCreationTests.cs (9)
439Assert.Equal(42, httpContext.Items["id"]);
465Assert.Equal(42, httpContext.Items["id"]);
487Assert.Null(httpContext.Items["id"]);
512Assert.Equal(42, httpContext.Items["id"]);
537Assert.Equal(42, httpContext.Items["id"]);
562Assert.Equal(42, httpContext.Items["id"]);
598Assert.Equal(new[] { 1, 2, 3 }, (int[])httpContext.Items["query"]!);
599Assert.Equal(new[] { 4, 5, 6 }, (int[])httpContext.Items["headers"]!);
600Assert.Equal(new[] { 7, 8, 9 }, (int[])httpContext.Items["form"]!);
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (58)
41Assert.Equal(httpContext.Request.Form.Files, httpContext.Items["formFiles"]);
42var formFilesArgument = Assert.IsAssignableFrom<IFormFileCollection>(httpContext.Items["formFiles"]);
76Assert.Equal(httpContext.Request.Form.Files, httpContext.Items["formFiles"]);
77var formFiles = Assert.IsAssignableFrom<IFormFileCollection>(httpContext.Items["formFiles"]);
111Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["formFiles"]);
112var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["formFiles"]);
149Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["formFiles"]);
150var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["formFiles"]);
187Assert.Equal(httpContext.Request.Form.Files["file1"], httpContext.Items["file1"]);
188var file1Argument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["file1"]);
192Assert.Equal(httpContext.Request.Form.Files["file2"], httpContext.Items["file2"]);
193var file2Argument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["file2"]);
228Assert.Equal(httpContext.Request.Form.Files["file1"], httpContext.Items["file1"]);
229Assert.NotNull(httpContext.Items["file1"]);
231Assert.Equal(httpContext.Request.Form.Files["file2"], httpContext.Items["file2"]);
232Assert.Null(httpContext.Items["file2"]);
265Assert.Equal(httpContext.Request.Form.Files["my_file"], httpContext.Items["formFiles"]);
266var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["formFiles"]);
302Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["formFiles"]);
303var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["formFiles"]);
307var traceIdArgument = Assert.IsType<TraceIdentifier>(httpContext.Items["traceId"]);
368httpContext.Items["invoked"] = false;
375Assert.False((bool)httpContext.Items["invoked"]);
408Assert.Equal(httpContext.Request.Form.Files, httpContext.Items["formFiles"]);
409var formFilesArgument = Assert.IsType<FormFileCollection>(httpContext.Items["formFiles"]);
412Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["file"]);
413var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["file"]);
459Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["file"]);
460var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["file"]);
464var traceIdArgument = Assert.IsAssignableFrom<TraceIdentifier>(httpContext.Items["traceId"]);
504Assert.Equal(httpContext.Request.Form.Files["file"], httpContext.Items["file"]);
505var fileArgument = Assert.IsAssignableFrom<IFormFile>(httpContext.Items["file"]);
509var traceIdArgument = Assert.IsAssignableFrom<TraceIdentifier>(httpContext.Items["traceId"]);
556Assert.Equal(httpContext.Request.Form, httpContext.Items["formFiles"]);
557var formArgument = Assert.IsAssignableFrom<IFormCollection>(httpContext.Items["formFiles"]);
603Assert.Equal(httpContext.Request.Form, httpContext.Items["formFiles"]);
604var formArgument = Assert.IsAssignableFrom<IFormCollection>(httpContext.Items["formFiles"]);
650Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]);
679Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]);
680Assert.NotNull(httpContext.Items["message"]);
682Assert.Equal(httpContext.Request.Form["name"][0], httpContext.Items["name"]);
683Assert.NotNull(httpContext.Items["name"]);
712Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]);
713Assert.NotNull(httpContext.Items["message"]);
714Assert.Null(httpContext.Items["additionalMessage"]);
742Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]);
743Assert.NotNull(httpContext.Items["message"]);
772Assert.Equal(httpContext.Request.Form["message"][0], httpContext.Items["message"]);
773Assert.NotNull(httpContext.Items["message"]);
775var traceIdArgument = Assert.IsType<TraceIdentifier>(httpContext.Items["traceId"]);
835var formFilesArgument = Assert.IsAssignableFrom<FormFileCollection>(httpContext.Items["FormFilesArgument"]);
836var formArgument = Assert.IsAssignableFrom<IFormCollection>(httpContext.Items["FormArgument"]);
872httpContext.Items["invoked"] = false;
879Assert.False((bool)httpContext.Items["invoked"]);
904var content = Assert.IsType<MyTryParseRecord>(httpContext.Items["tryParsable"]);
937Assert.Null(httpContext.Items["invoked"]);
969Assert.Null(httpContext.Items["invoked"]);
1006Assert.Null(httpContext.Items["invoked"]);
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (13)
40Assert.Same(httpContext, httpContext.Items["arg"]);
63Assert.Equal(httpContext.RequestAborted, httpContext.Items["arg"]);
84Assert.Same(user, httpContext.Items["arg"]);
103Assert.Equal(httpContext.Request, httpContext.Items["arg"]);
122Assert.Equal(httpContext.Response, httpContext.Items["arg"]);
147Assert.Same(httpContext, httpContext.Items["input"]);
148Assert.Same(httpContext.User, httpContext.Items["user"]);
149Assert.Same(httpContext.Request, httpContext.Items["request"]);
150Assert.Same(httpContext.Response, httpContext.Items["response"]);
251Assert.Equal(expectedValue, httpContext.Items["parameterWithDefault"]);
254Assert.Equal(expectedValue, httpContext.Items["parameterWithConst"]);
283Assert.Equal(2.15m, httpContext.Items["parameterWithDefault"]);
284Assert.Equal(3.15m, httpContext.Items["parameterWithConst"]);
Microsoft.AspNetCore.Http.Results.Tests (46)
ResultsOfTTests.Generated.cs (46)
59Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
122Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
147Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
174Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
201Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
274Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
339Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
366Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
393Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
422Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
451Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
480Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
558Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
625Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
654Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
683Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
712Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
743Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
774Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
805Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
836Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
919Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
988Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1019Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1050Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1081Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1112Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1145Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1178Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1211Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1244Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1277Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1365Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1436Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1469Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1502Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1535Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1568Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1601Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1636Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1671Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1706Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1741Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1776Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1811Assert.Equal(input, httpContext.Items[nameof(ChecksumResult.Checksum)]);
1852httpContext.Items[nameof(ChecksumResult.Checksum)] = Checksum;
Microsoft.AspNetCore.Http.Tests (3)
Microsoft.AspNetCore.Mvc.Core (4)
Microsoft.AspNetCore.Mvc.Core.Test (12)
Microsoft.AspNetCore.Mvc.ViewFeatures (8)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Microsoft.AspNetCore.Owin (17)
Microsoft.AspNetCore.Routing (5)
Microsoft.AspNetCore.Routing.Tests (27)
Mvc.RoutingWebSite (5)
ServerComparison.TestSites (2)