-
Notifications
You must be signed in to change notification settings - Fork 10
[BUG] - FluentValidation validators are not settable in ValidationCommandBehavior. #164
Copy link
Copy link
Closed
Copy link
Labels
bugfixThis label is in use for patch version incrementsThis label is in use for patch version increments
Milestone
Description
Describe the bug
We have a bunch of FluentValidation validators that are not being picked up.
Steps to Reproduce
We run the following code when we initialise..
public static class CortexMediatorConfiguration
{
public static IServiceCollection ConfigureCortexMediator(this IServiceCollection services, IConfiguration configuration)
{
services.AddCortexMediator(
configuration,
handlerAssemblyMarkerTypes: [typeof(Program)],
options => options.AddDefaultBehaviors().AddOpenCommandPipelineBehavior(typeof(ValidationCommandBehavior<,>)));
return services;
}
}Expected Behavior
Validators for the command behaviour are discovered
Actual Behavior
Validators for command behaviour are always null
Environment Information
- OS: Windows 10
- .NET Runtime/Version: .NET 10.0
- Cortex SDK Version: 2.2
Code Samples / Logs
public static class CortexMediatorConfiguration
{
public static IServiceCollection ConfigureCortexMediator(this IServiceCollection services, IConfiguration configuration)
{
services.AddCortexMediator(
configuration,
handlerAssemblyMarkerTypes: [typeof(Program)],
options => options.AddDefaultBehaviors().AddOpenCommandPipelineBehavior(typeof(ValidationCommandBehavior<,>)));
return services;
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugfixThis label is in use for patch version incrementsThis label is in use for patch version increments