5 instantiations of JsonHttpResult
Microsoft.AspNetCore.Http.Results (5)
43 references to JsonHttpResult
Microsoft.AspNetCore.Http.Results (15)
Microsoft.AspNetCore.Http.Results.Tests (28)
JsonResultTests.cs (9)
21var result = new JsonHttpResult<object>(value: null, statusCode: 411, jsonSerializerOptions: null);
39var result = new JsonHttpResult<object>(value: null, statusCode: 407, jsonSerializerOptions: null);
57var result = new JsonHttpResult<string>(value: "Hello", statusCode: 407, jsonSerializerOptions: null);
85var result = new JsonHttpResult<object>(value, jsonSerializerOptions: jsonOptions);
118var result = new JsonHttpResult<ProblemDetails>(details, jsonSerializerOptions: JsonSerializerOptions.Web);
147var result = new JsonHttpResult<HttpValidationProblemDetails>(details, jsonSerializerOptions: JsonSerializerOptions.Web);
208var result = new JsonHttpResult<HttpValidationProblemDetails>(details, jsonSerializerOptions: null, StatusCodes.Status422UnprocessableEntity);
227var result = new JsonHttpResult<ProblemDetails>(details, jsonSerializerOptions: null);
247var result = new JsonHttpResult<object>(null, jsonSerializerOptions: null, null, null);
ResultsTests.cs (15)
939var result = Results.Json(data, options, contentType, statusCode) as JsonHttpResult<object>;
958var result = Results.Json(data, options, contentType, statusCode) as JsonHttpResult<Todo>;
971var result = Results.Json(null) as JsonHttpResult<object>;
984var result = Results.Json(null, StringJsonContext.Default.String as JsonTypeInfo) as JsonHttpResult<object>;
998var result = Results.Json(null, typeof(string), StringJsonContext.Default) as JsonHttpResult<object>;
1012var result = Results.Json(null, StringJsonContext.Default.String) as JsonHttpResult<string>;
1026var result = Results.Json<string>(null, StringJsonContext.Default) as JsonHttpResult<string>;
1759(() => Results.Json(new(), (JsonSerializerOptions)null, null, null), typeof(JsonHttpResult<object>)),