diff --git a/README.md b/README.md index 1ccfe65..4a54718 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ It adds MediatR requests handlers, although you might need to add other types li TypeNameFilter = "*Repository", AsImplementedInterfaces = true, Lifetime = ServiceLifetime.Scoped)] -private static partial IServiceCollection AddRepositories(this IServiceCollection services); +public static partial IServiceCollection AddRepositories(this IServiceCollection services); ``` ### Add AspNetCore Minimal API endpoints @@ -164,4 +164,4 @@ public static partial class ModelBuilderExtensions | **ExcludeByTypeName** | Sets this value to exclude types from being registered by their full name. You can use '*' wildcards. You can also use ',' to separate multiple filters. | | **ExcludeByAttribute** | Excludes matching types by the specified attribute type being present. | | **KeySelector** | Sets this property to add types as keyed services. This property should point to one of the following:
- The name of a static method in the current type with a string return type. The method should be either generic or have a single parameter of type `Type`.
- A constant field or static property in the implementation type. | -| **CustomHandler** | Sets this property to invoke a custom method for each type found instead of regular registration logic. This property should point to one of the following:
- Name of a generic method in the current type.
- Static method name in found types.
This property is incompatible with `Lifetime`, `AsImplementedInterfaces`, `AsSelf`, and `KeySelector` properties.
**Note:** When using a generic `CustomHandler` method, types are automatically filtered by the generic constraints defined on the method's type parameters (e.g., `class`, `struct`, `new()`, interface constraints). | \ No newline at end of file +| **CustomHandler** | Sets this property to invoke a custom method for each type found instead of regular registration logic. This property should point to one of the following:
- Name of a generic method in the current type.
- Static method name in found types.
This property is incompatible with `Lifetime`, `AsImplementedInterfaces`, `AsSelf`, and `KeySelector` properties.
**Note:** When using a generic `CustomHandler` method, types are automatically filtered by the generic constraints defined on the method's type parameters (e.g., `class`, `struct`, `new()`, interface constraints). |