Skip to content

Commit

Permalink
[r] nullable
Browse files Browse the repository at this point in the history
[r] name
  • Loading branch information
i4004 committed Aug 1, 2023
1 parent 7f8b5bf commit 2b2b476
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Simplify.DI.Provider.Autofac/AutofacDIProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public IContainer Container
/// <summary>
/// Resolves the specified service type.
/// </summary>
/// <param name="serviceType">Type of the service.</param>
/// <param name="type">Type of the service.</param>
/// <returns></returns>
public object Resolve(Type serviceType) => Container.Resolve(serviceType);
public object Resolve(Type type) => Container.Resolve(type);

/// <summary>
/// Registers the specified service type with corresponding implementation type.
Expand Down
2 changes: 1 addition & 1 deletion src/Simplify.DI.Provider.Autofac/AutofacExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)!;
}
}

0 comments on commit 2b2b476

Please sign in to comment.