Skip to content

Commit

Permalink
Add doc for KeySelector
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamescaper committed Sep 30, 2024
1 parent d3ed065 commit 8410af5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ private static partial IServiceCollection AddRepositories(this IServiceCollectio
| **AsImplementedInterfaces** | If true, the registered types will be registered as implemented interfaces instead of their actual type. |
| **AsSelf** | If true, types will be registered with their actual type. It can be combined with `AsImplementedInterfaces`. In that case implemeted interfaces will be "forwarded" to an actual implementation type |
| **TypeNameFilter** | Set this value to filter the types to register by their full name. You can use '*' wildcards. You can also use ',' to separate multiple filters. |
| **KeySelector** | Set this value to a static method name returning string. Returned value will be used as a key for the registration. Method should either be generic, or have a single parameter of type `Type`. |
2 changes: 1 addition & 1 deletion ServiceScan.SourceGenerator/GenerateAttributeSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ internal class GenerateServiceRegistrationsAttribute : Attribute
public string? TypeNameFilter { get; set; }
/// <summary>
/// Set this value to a static method returning string.
/// Set this value to a static method name returning string.
/// Returned value will be used as a key for the registration.
/// Method should either be generic, or have a single parameter of type <see cref="Type"/>.
/// </summary>
Expand Down

0 comments on commit 8410af5

Please sign in to comment.