From f7e6cf145e4b18f12675d7f0f0eb7d5216cd1a80 Mon Sep 17 00:00:00 2001 From: Nick Stanton Date: Tue, 18 Oct 2022 11:43:08 -0600 Subject: [PATCH] API Debt - Microsoft.Extensions.DependencyInjection (#76940) * Resolve missing triple-slash * Apply suggestions from code review Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- .../src/ServiceDescriptor.cs | 15 +++++++++++++++ .../ServiceCollectionHostedServiceExtensions.cs | 3 +++ 2 files changed, 18 insertions(+) diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceDescriptor.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceDescriptor.cs index cf75d6998a694..4e04ace1f8685 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceDescriptor.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ServiceDescriptor.cs @@ -72,15 +72,30 @@ private ServiceDescriptor(Type serviceType, ServiceLifetime lifetime) ServiceType = serviceType; } + /// + /// Gets the of the service. + /// public ServiceLifetime Lifetime { get; } + /// + /// Gets the of the service. + /// public Type ServiceType { get; } + /// + /// Gets the that implements the service. + /// [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] public Type? ImplementationType { get; } + /// + /// Gets the instance that implements the service. + /// public object? ImplementationInstance { get; } + /// + /// Gets the factory used for creating service instances. + /// public Func? ImplementationFactory { get; } /// diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/ServiceCollectionHostedServiceExtensions.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/ServiceCollectionHostedServiceExtensions.cs index 5b8092edbd1f1..67ea8b13cbd58 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/ServiceCollectionHostedServiceExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/ServiceCollectionHostedServiceExtensions.cs @@ -8,6 +8,9 @@ namespace Microsoft.Extensions.DependencyInjection { + /// + /// Extension methods for adding hosted services to an . + /// public static class ServiceCollectionHostedServiceExtensions { ///