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