-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wolverine now considers a method named "Validate" or "ValidateAsync" …
…to be a "before" method
- Loading branch information
1 parent
63691a1
commit 8b55274
Showing
3 changed files
with
2 additions
and
3 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ namespace Wolverine.Middleware; | |
|
||
public class MiddlewarePolicy : IChainPolicy | ||
{ | ||
public static readonly string[] BeforeMethodNames = ["Before", "BeforeAsync", "Load", "LoadAsync"]; | ||
public static readonly string[] BeforeMethodNames = ["Before", "BeforeAsync", "Load", "LoadAsync", "Validate", "ValidateAsync"]; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
igor-toporet
Contributor
|
||
public static readonly string[] AfterMethodNames = ["After", "AfterAsync", "PostProcess", "PostProcessAsync"]; | ||
public static readonly string[] FinallyMethodNames = ["Finally", "FinallyAsync"]; | ||
|
||
|
do those get executed in this exact order? or they're here in alphabetical order coincidentally?
cause if a handler has both Load and Validate can we count that Load will be executed first?
also, I hope sync/async versions can be mixed and matched. most likely the Load will be async (LoadAsync), while Validate most likely synchronous, just in-memory/in-process validation without requiring any IO.