From 2b2b476f97b6d1acbd769b3ec2b86ff5c683f2a1 Mon Sep 17 00:00:00 2001 From: Alexanderius Date: Tue, 1 Aug 2023 10:39:06 +0600 Subject: [PATCH] [r] nullable [r] name --- src/Simplify.DI.Provider.Autofac/AutofacDIProvider.cs | 4 ++-- src/Simplify.DI.Provider.Autofac/AutofacExtensions.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Simplify.DI.Provider.Autofac/AutofacDIProvider.cs b/src/Simplify.DI.Provider.Autofac/AutofacDIProvider.cs index 4268c8ba..e856a9eb 100644 --- a/src/Simplify.DI.Provider.Autofac/AutofacDIProvider.cs +++ b/src/Simplify.DI.Provider.Autofac/AutofacDIProvider.cs @@ -40,9 +40,9 @@ public IContainer Container /// /// Resolves the specified service type. /// - /// Type of the service. + /// Type of the service. /// - public object Resolve(Type serviceType) => Container.Resolve(serviceType); + public object Resolve(Type type) => Container.Resolve(type); /// /// Registers the specified service type with corresponding implementation type. diff --git a/src/Simplify.DI.Provider.Autofac/AutofacExtensions.cs b/src/Simplify.DI.Provider.Autofac/AutofacExtensions.cs index af492d93..5df4caa5 100644 --- a/src/Simplify.DI.Provider.Autofac/AutofacExtensions.cs +++ b/src/Simplify.DI.Provider.Autofac/AutofacExtensions.cs @@ -20,6 +20,6 @@ public static Type GetAutofacServiceType(this Service service) { var property = service.GetType().GetProperty(ServiceTypePropertyName) ?? throw new InvalidOperationException($"Error reading {ServiceTypePropertyName}"); - return (Type)property.GetValue(service); + return (Type)property.GetValue(service)!; } } \ No newline at end of file