-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configurable behaviors to MinimalApiMediatR
- Loading branch information
1 parent
5559a3c
commit d88dd2c
Showing
2 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
src/MediatR.MinimalApi/Configurations/MinimalApiMediatRConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace MediatR.MinimalApi.Configurations; | ||
|
||
public class MinimalApiMediatRConfiguration | ||
{ | ||
public bool UseValidationBehavior { get; set; } = true; | ||
public bool UseAuthorizationBehavior { get; set; } = true; | ||
public bool UseRoleBasedPostProcessor { get; set; } = true; | ||
} |
21 changes: 16 additions & 5 deletions
21
src/MediatR.MinimalApi/Extensions/ServiceConfigurationExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters