81 references to SerializerOptions
Microsoft.AspNetCore.Authentication.BearerToken (2)
Microsoft.AspNetCore.Diagnostics (1)
Microsoft.AspNetCore.Http.Abstractions.Tests (2)
Microsoft.AspNetCore.Http.Extensions (5)
Microsoft.AspNetCore.Http.Extensions.Tests (56)
ProblemDetailsServiceCollectionExtensionsTest.cs (34)
91collection.ConfigureAll<JsonOptions>(options => options.SerializerOptions.TypeInfoResolver = new TestExtensionsJsonContext());
101Assert.NotNull(jsonOptions.Value.SerializerOptions.TypeInfoResolver);
102Assert.NotNull(jsonOptions.Value.SerializerOptions.TypeInfoResolver.GetTypeInfo(typeof(ProblemDetails), jsonOptions.Value.SerializerOptions));
103Assert.NotNull(jsonOptions.Value.SerializerOptions.TypeInfoResolver.GetTypeInfo(typeof(TypeA), jsonOptions.Value.SerializerOptions));
114options.SerializerOptions.TypeInfoResolver = new TestExtensionsJsonContext();
115options.SerializerOptions.MakeReadOnly();
147collection.ConfigureAll<JsonOptions>(options => options.SerializerOptions.TypeInfoResolverChain.Insert(0, TestExtensionsJsonContext.Default));
151collection.ConfigureAll<JsonOptions>(options => options.SerializerOptions.TypeInfoResolverChain.Add(TestExtensionsJsonContext.Default));
155collection.ConfigureAll<JsonOptions>(options => options.SerializerOptions.TypeInfoResolver = TestExtensionsJsonContext.Default);
166Assert.NotNull(jsonOptions.Value.SerializerOptions.TypeInfoResolver);
167Assert.NotNull(jsonOptions.Value.SerializerOptions.TypeInfoResolver.GetTypeInfo(typeof(ProblemDetails), jsonOptions.Value.SerializerOptions));
168Assert.NotNull(jsonOptions.Value.SerializerOptions.TypeInfoResolver.GetTypeInfo(typeof(TypeA), jsonOptions.Value.SerializerOptions));
177collection.ConfigureAll<JsonOptions>(options => options.SerializerOptions.TypeInfoResolver = null);
187Assert.NotNull(jsonOptions.Value.SerializerOptions.TypeInfoResolver);
188Assert.NotNull(jsonOptions.Value.SerializerOptions.TypeInfoResolver.GetTypeInfo(typeof(ProblemDetails), jsonOptions.Value.SerializerOptions));
197collection.ConfigureAll<JsonOptions>(options => options.SerializerOptions.TypeInfoResolver = new DefaultJsonTypeInfoResolver());
207Assert.NotNull(jsonOptions.Value.SerializerOptions.TypeInfoResolver);
208Assert.IsNotType<DefaultJsonTypeInfoResolver>(jsonOptions.Value.SerializerOptions.TypeInfoResolver);
209Assert.NotNull(jsonOptions.Value.SerializerOptions.TypeInfoResolver.GetTypeInfo(typeof(ProblemDetails), jsonOptions.Value.SerializerOptions));
210Assert.NotNull(jsonOptions.Value.SerializerOptions.TypeInfoResolver.GetTypeInfo(typeof(TypeA), jsonOptions.Value.SerializerOptions));
225collection.ConfigureAll<JsonOptions>(options => options.SerializerOptions.TypeInfoResolverChain.Insert(0, customProblemDetailsResolver));
232Assert.NotNull(jsonOptions.Value.SerializerOptions.TypeInfoResolver);
234Assert.Equal(3, jsonOptions.Value.SerializerOptions.TypeInfoResolverChain.Count);
235Assert.IsType<CustomProblemDetailsTypeInfoResolver>(jsonOptions.Value.SerializerOptions.TypeInfoResolverChain[0]);
236Assert.Equal("Microsoft.AspNetCore.Http.ProblemDetailsJsonContext", jsonOptions.Value.SerializerOptions.TypeInfoResolverChain[1].GetType().FullName);
237Assert.IsType<DefaultJsonTypeInfoResolver>(jsonOptions.Value.SerializerOptions.TypeInfoResolverChain[2]);
239var pdTypeInfo = jsonOptions.Value.SerializerOptions.GetTypeInfo(typeof(ProblemDetails));
Microsoft.AspNetCore.Http.Results (1)
Microsoft.AspNetCore.Http.Results.Tests (6)
Microsoft.AspNetCore.Identity (1)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.OpenApi.Tests (4)
Microsoft.AspNetCore.Routing (1)