Conversation
- Introduced `DuplicateTestRequestHandler` for handling duplicate requests. - Added `TestLoggingBehavior`, `TestPerformanceBehavior`, and `TestValidationBehavior` for logging, performance tracking, and validation. - Created `PipelineTestRequest` and `PipelineTestRequestHandler` for handling pipeline requests. - Updated `ValidatedRequest` and `ValidatedRequestHandler` with validation attributes. - Enhanced `PipelineBehaviorTests` to cover various request handling scenarios. - Added tests in `ServiceCollectionExtensionsTests` for service registration verification.
Updated `ServiceCollectionExtensions.cs` to include methods for adding pipeline behaviors such as `AddPipelineBehavior`, `AddLoggingBehavior`, `AddPerformanceBehavior`, and `AddValidationBehavior`. Enhanced `AddEssentialMediatorCore` to handle `ServiceLifetime.Scoped` for `IMediator` registration and prevent duplicate assemblies during handler registration. Refactored the `Mediator` class in `Mediator.cs` to implement a pipeline behavior pattern in the `Send` and `Publish` methods. Improved error handling and logging for better context and robustness during request processing.
- Introduced `EssentialMediator.WebApiDemo` project and `samples` project. - Created `UsersController` for user-related API endpoints. - Implemented `DemoDbContext` for in-memory user data management. - Added command and query classes for user operations with validation. - Developed notification handlers for user events and logging. - Configured middleware for request logging and observability. - Updated project file with necessary package references. - Seeded initial data and added launch settings for the application. - Created API test file to document and test endpoints.
Significantly enhance the README.md file for the EssentialMediator library. Key updates include improved feature descriptions, detailed explanations of Request/Response and Notification patterns, and new sections on architecture, installation, and setup. Introduced a comprehensive ASP.NET Core Web API demo, updated usage examples, clarified package purposes, and added troubleshooting tips to improve usability for developers.
Added a CI workflow with triggers for push and pull request events on the `main` and `develop` branches. Introduced a `build-and-test` job that runs on Ubuntu, which includes steps for checking out the code, setting up .NET 9.0.x, restoring dependencies, building the project in Release configuration, and running tests.
This commit introduces a comprehensive suite of unit tests for the EssentialMediator library, focusing on logging behaviors, performance measurements, validation, exception handling, and service registration configurations. New classes and methods are implemented to test the mediator pattern's functionality, including request and notification handling. The tests also ensure proper logging and error handling in various scenarios, while validating the behavior of the `Unit` type, including its consistency and implicit conversions to `Task` and `ValueTask`.
- Added warning notes about the project being under construction in multiple sections. - Updated project description to highlight its lightweight and efficient Mediator pattern implementation. - Introduced "Projects Structure" section for clarity on modular architecture. - Renamed "Getting Started" to "Quick Start Guide" and provided detailed setup instructions. - Clarified licensing information regarding the MIT License. - Added a new section for the "EssentialMediator WebAPI Demo" to showcase usage patterns. - Revised "Related Packages" to "Related Projects" for consistency. - Clarified project requirements, including .NET 9.0 and Microsoft.Extensions.DependencyInjection.Abstractions 8.0+. - Enhanced core implementation description and updated usage instructions for FluentValidation integration.
- Documented CI/CD workflows in README.md, including details on Continuous Integration and automatic PRs. - Updated `auto-pr-to-main.yml` to trigger on pushes to `develop`, with steps for building, testing, and PR creation. - Modified `ci.yml` to run only on direct pushes to `main` and pull requests. - Clarified that various projects and demos are under construction in README.md, noting potential API changes and incomplete features.
Enhanced `auto-pr-to-main.yml` with permissions for reading contents and writing pull requests and issues. Improved the pull request creation process by adding a detailed body message and adjusting labels. Enhanced error handling to provide feedback if PR creation fails due to an existing PR.
Updated `README.md` to require a Personal Access Token (PAT) for creating Pull Requests instead of the default `GITHUB_TOKEN`. Added instructions for generating the PAT and adding it as a secret. Modified `auto-pr-to-main.yml` to utilize the new `PAT_TOKEN` for authorization in API calls.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated Pull Request
This PR was automatically created after successful CI build and tests on the develop branch.
What was validated:
Changes included:
All changes that were pushed to the develop branch since the last merge to main.
Review checklist:
Created automatically by GitHub Actions