1 instantiation of Conflict
Microsoft.AspNetCore.Http.Results (1)
TypedResults.cs (1)
697
public static Conflict<TValue> Conflict<TValue>(TValue? error) =>
new
(error);
17 references to Conflict
Microsoft.AspNetCore.Http.Results (2)
TypedResults.cs (2)
696
/// <returns>The created <see cref="HttpResults.
Conflict
{TValue}"/> for the response.</returns>
697
public static
Conflict
<TValue> Conflict<TValue>(TValue? error) => new(error);
Microsoft.AspNetCore.Http.Results.Tests (15)
ConflictOfTResultTests.cs (9)
24
var
conflictObjectResult = new Conflict<object>(obj);
36
var
conflictObjectResult = new Conflict<ProblemDetails>(obj);
48
var
result = new Conflict<string>("Hello");
65
var
result = new Conflict<string>("Hello");
87
Conflict
<Todo> MyApi() { throw new NotImplementedException(); }
92
PopulateMetadata<
Conflict
<Todo>>(((Delegate)MyApi).GetMethodInfo(), builder);
105
var
result = new Conflict<object>(null);
116
Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<
Conflict
<object>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0)));
117
Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<
Conflict
<object>>(((Delegate)PopulateMetadata_ThrowsArgumentNullException_WhenMethodOrBuilderAreNull).GetMethodInfo(), null));
ResultsTests.cs (5)
488
var
result = Results.Conflict(value) as
Conflict
<object>;
502
var
result = Results.Conflict(value) as
Conflict
<Todo>;
1741
(() => Results.Conflict(new()), typeof(
Conflict
<object>)),
TypedResultsTests.cs (1)
498
var
result = TypedResults.Conflict(value);