-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor StyleSheetMiddleware for readability and modularity
Refactored the `Invoke` method in `StyleSheetMiddleware` to improve readability and maintainability. Introduced two new private methods: `HandleDefaultPath` and `HandleContentCss`, which handle specific request paths. Updated path comparisons to use `string.Equals` with `StringComparison.OrdinalIgnoreCase` for case-insensitive comparison. Stored `requestPath` in a variable to avoid repeated calls. Encapsulated inline logic for custom and content CSS handling within new methods, enhancing modularity and testability.
- Loading branch information
Showing
1 changed file
with
40 additions
and
38 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