Skip to content

Commit

Permalink
update for keyed service
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 committed Nov 18, 2023
1 parent e26494e commit 215ed5c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public class ServiceImplementation : IService { }

#### Keyed Services

You can register keyed services if your project targets .NET 8.0+
You can register keyed services with version 8.0+ of `Microsoft.Extensions.DependencyInjection`

Register a keyed service

Expand Down
2 changes: 0 additions & 2 deletions src/Injectio.Attributes/RegisterAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ protected RegisterAttribute()
/// <seealso cref="P:Microsoft.Extensions.DependencyInjection.ServiceDescriptor.ServiceType"/>
public Type? ServiceType { get; set; }

#if NET8_0_OR_GREATER
/// <summary>
/// Gets or sets the key of the service.
/// </summary>
/// <value>The service key.</value>
/// <seealso cref="P:Microsoft.Extensions.DependencyInjection.ServiceDescriptor.ServiceKey "/>
public object? ServiceKey { get; set; }
#endif

/// <summary>
/// Name of a factory method to create new instances of the service implementation
Expand Down

0 comments on commit 215ed5c

Please sign in to comment.