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