From 617836f8a01000fdbb57da626a946b6c67430ce5 Mon Sep 17 00:00:00 2001 From: InsomniumBR Date: Thu, 19 Feb 2026 11:04:40 -0700 Subject: [PATCH] Update README.md Small fix on visibility for the AddRepositories so we could call it to add them. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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). |