3 implementations of IProblemDetailsWriter
Microsoft.AspNetCore.Http.Extensions (1)
DefaultProblemDetailsWriter.cs (1)
12internal sealed partial class DefaultProblemDetailsWriter : IProblemDetailsWriter
Microsoft.AspNetCore.Http.Extensions.Tests (1)
ProblemDetailsServiceTest.cs (1)
144private class MetadataBasedWriter : IProblemDetailsWriter
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\DefaultApiProblemDetailsWriter.cs (1)
10internal sealed class DefaultApiProblemDetailsWriter : IProblemDetailsWriter
26 references to IProblemDetailsWriter
Microsoft.AspNetCore.Http.Abstractions (7)
ProblemDetails\IProblemDetailsService.cs (7)
14/// using the registered <see cref="IProblemDetailsWriter"/> services. 17/// <remarks>The <see cref="IProblemDetailsWriter"/> registered services 21/// <item><description>All <see cref="IProblemDetailsWriter"/> were executed and none of them was able to write the response successfully.</description></item> 24/// <exception cref="InvalidOperationException">If no <see cref="IProblemDetailsWriter"/> can write to the given context.</exception> 29/// using the registered <see cref="IProblemDetailsWriter"/> services. 32/// <remarks>The <see cref="IProblemDetailsWriter"/> registered services 36/// <item><description>All <see cref="IProblemDetailsWriter"/> were executed and none of them was able to write the response successfully.</description></item>
Microsoft.AspNetCore.Http.Extensions (4)
ProblemDetailsService.cs (3)
10private readonly IProblemDetailsWriter[] _writers; 13IEnumerable<IProblemDetailsWriter> writers) 37var selectedWriter = _writers[i];
ProblemDetailsServiceCollectionExtensions.cs (1)
42services.TryAddEnumerable(ServiceDescriptor.Singleton<IProblemDetailsWriter, DefaultProblemDetailsWriter>());
Microsoft.AspNetCore.Http.Extensions.Tests (13)
ProblemDetailsServiceCollectionExtensionsTest.cs (7)
29Assert.Single(collection, (sd) => sd.ServiceType == typeof(IProblemDetailsWriter) && sd.ImplementationType == typeof(DefaultProblemDetailsWriter)); 45Assert.Single(collection, (sd) => sd.ServiceType == typeof(IProblemDetailsWriter) && sd.ImplementationType == typeof(DefaultProblemDetailsWriter)); 55var mockWriter = Mock.Of<IProblemDetailsWriter>(); 56collection.TryAddEnumerable(ServiceDescriptor.Singleton(typeof(IProblemDetailsWriter), mockWriter)); 62var serviceDescriptors = collection.Where(serviceDescriptor => serviceDescriptor.ServiceType == typeof(IProblemDetailsWriter)); 65$"Expected service type '{typeof(IProblemDetailsWriter)}' to be registered {expectedCount}" +
ProblemDetailsServiceTest.cs (6)
15writers: new List<IProblemDetailsWriter> 41writers: new List<IProblemDetailsWriter> 83writers: new List<IProblemDetailsWriter> { new MetadataBasedWriter() }); 118writers: new List<IProblemDetailsWriter> { new MetadataBasedWriter() }); 133IEnumerable<IProblemDetailsWriter> writers = null) 135writers ??= Array.Empty<IProblemDetailsWriter>();
Microsoft.AspNetCore.Mvc.Core (1)
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
277services.TryAddEnumerable(ServiceDescriptor.Singleton<IProblemDetailsWriter, DefaultApiProblemDetailsWriter>());
Microsoft.AspNetCore.Mvc.Core.Test (1)
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (1)
328typeof(IProblemDetailsWriter),