Skip to content

Initial setup#1

Merged
hard-rox merged 14 commits intomainfrom
initial-setup
Jan 27, 2026
Merged

Initial setup#1
hard-rox merged 14 commits intomainfrom
initial-setup

Conversation

@hard-rox
Copy link
Copy Markdown
Owner

@hard-rox hard-rox commented Jan 27, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced ProDispatch, an in-process dispatcher framework for .NET supporting commands, queries, and notifications with extensible pipeline behaviors.
    • Added pipeline behavior support for cross-cutting concerns including validation, logging, and custom middleware.
    • Included sample applications demonstrating framework usage in console and ASP.NET Minimal API environments.
  • Documentation

    • Comprehensive guides covering getting started, advanced usage, performance optimization, and migration guidance.
  • Tests

    • Added unit and integration test suites with performance benchmarks.

✏️ Tip: You can customize this high-level summary in your review settings.

…ies, and notifications

- Added core abstractions for commands, queries, notifications, and pipeline behaviors.
- Implemented InProcessDispatcher to handle command and query execution.
- Created command and query handlers for user management (CreateUser, UpdateUserEmail).
- Introduced validation and logging behaviors for pipeline processing.
- Developed service factory for dependency resolution.
- Added example usage in Program.cs demonstrating command and query execution.
- Included README-DEV.md for project overview and usage instructions.
…andling

- Implemented core abstractions for commands, queries, and notifications.
- Created in-process dispatcher to handle command and query execution.
- Added pipeline behaviors for logging and validation.
- Developed a simple service factory for dependency resolution.
- Introduced example console application demonstrating usage.
- Implemented integration tests for end-to-end scenarios.
- Added unit tests for dispatcher functionality and validation behavior.
chore: Update README with project structure and commands
feat: Add global usings for benchmarks and examples
…ncluding CreateUser and GetUserById commands, timing behavior, and interactive API documentation
…tializations, and remove redundant `using` directives for cleaner and more consistent codebase.
@hard-rox hard-rox merged commit 7cd4e89 into main Jan 27, 2026
1 check was pending
@hard-rox hard-rox deleted the initial-setup branch January 27, 2026 00:45
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 27, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This pull request introduces ProDispatch, a new in-process dispatcher framework for .NET 10.0. It includes core abstractions (commands, queries, notifications, pipeline behaviors, validation), implementations (InProcessDispatcher, SimpleServiceFactory), two comprehensive sample applications (console and minimal API), benchmarks, integration and unit tests, CI/CD workflows, and project documentation.

Changes

Cohort / File(s) Summary
Configuration & Build
.editorconfig, Directory.Build.props, Directory.Packages.props, nuget.config, ProDispatch.slnx, sonar-project.properties
Project-wide coding styles, centralized package management, solution structure, and SonarQube integration
GitHub & Automation
.github/ISSUE_TEMPLATE/bug_report.md, .github/ISSUE_TEMPLATE/feature_request.md, .github/PULL_REQUEST_TEMPLATE.md, .github/copilot-instructions.md, .github/dependabot.yml, .github/workflows/ci.yml, .github/workflows/codeql.yml, .github/workflows/release.yml, .gitignore
Issue templates, PR template, Dependabot setup, CI/CodeQL/Release workflows, and git exclusions
Documentation
README.md, CHANGELOG.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md, docs/getting-started.md, docs/advanced-usage.md, docs/migration-from-mediatr.md, docs/performance.md
Comprehensive project documentation covering setup, usage patterns, MediatR migration guidance, and performance tips
Core Library Abstractions
src/ProDispatch/Abstractions/Commands/ICommand.cs, src/ProDispatch/Abstractions/Commands/ICommandHandler.cs, src/ProDispatch/Abstractions/Dispatcher/IDispatcher.cs, src/ProDispatch/Abstractions/Exceptions/ValidationException.cs, src/ProDispatch/Abstractions/Notifications/INotification.cs, src/ProDispatch/Abstractions/Notifications/INotificationHandler.cs, src/ProDispatch/Abstractions/Pipeline/IPipelineBehavior.cs, src/ProDispatch/Abstractions/Queries/IQuery.cs, src/ProDispatch/Abstractions/Queries/IQueryHandler.cs, src/ProDispatch/Abstractions/Unit/Unit.cs, src/ProDispatch/Abstractions/Validation/IValidatable.cs
Core interface contracts for commands, queries, notifications, pipeline behaviors, dispatcher, validation, and exceptions
Core Library Implementation
src/ProDispatch/Dispatcher/InProcessDispatcher.cs, src/ProDispatch/ServiceFactory/IServiceFactory.cs, src/ProDispatch/ServiceFactory/SimpleServiceFactory.cs, src/ProDispatch/GlobalUsings.cs, src/ProDispatch/ProDispatch.csproj
InProcessDispatcher with reflection-based handler resolution and pipeline composition; SimpleServiceFactory implementation; project configuration
Benchmarks
benchmarks/ProDispatch.Benchmarks/DispatcherBenchmarks.cs, benchmarks/ProDispatch.Benchmarks/GlobalUsings.cs, benchmarks/ProDispatch.Benchmarks/Program.cs, benchmarks/ProDispatch.Benchmarks/ProDispatch.Benchmarks.csproj
BenchmarkDotNet suite measuring dispatcher overhead with varying pipeline configurations
Console Sample Application
samples/ProDispatch.Examples.Console/Behaviors/LoggingBehavior.cs, samples/ProDispatch.Examples.Console/Behaviors/ValidationBehavior.cs, samples/ProDispatch.Examples.Console/Features/Users/Commands/CreateUserCommand.cs, samples/ProDispatch.Examples.Console/Features/Users/Commands/CreateUserCommandHandler.cs, samples/ProDispatch.Examples.Console/Features/Users/Commands/UpdateUserEmailCommand.cs, samples/ProDispatch.Examples.Console/Features/Users/Commands/UpdateUserEmailCommandHandler.cs, samples/ProDispatch.Examples.Console/Features/Users/Notifications/SendWelcomeEmailNotificationHandler.cs, samples/ProDispatch.Examples.Console/Features/Users/Notifications/UserCreatedNotification.cs, samples/ProDispatch.Examples.Console/Features/Users/Notifications/UserCreatedNotificationHandler.cs, samples/ProDispatch.Examples.Console/Features/Users/Queries/GetUserByIdQuery.cs, samples/ProDispatch.Examples.Console/Features/Users/Queries/GetUserByIdQueryHandler.cs, samples/ProDispatch.Examples.Console/GlobalUsings.cs, samples/ProDispatch.Examples.Console/Program.cs, samples/ProDispatch.Examples.Console/ProDispatch.Examples.Console.csproj
Console application demonstrating command/query/notification patterns with logging and validation behaviors
Minimal API Sample Application
samples/ProDispatch.Examples.MinimalApi/Behaviors/LoggingBehavior.cs, samples/ProDispatch.Examples.MinimalApi/Behaviors/TimingBehavior.cs, samples/ProDispatch.Examples.MinimalApi/Behaviors/ValidationBehavior.cs, samples/ProDispatch.Examples.MinimalApi/Features/Users/Commands/CreateUser.cs, samples/ProDispatch.Examples.MinimalApi/Features/Users/Commands/CreateUserHandler.cs, samples/ProDispatch.Examples.MinimalApi/Features/Users/Notifications/SendWelcomeEmailNotificationHandler.cs, samples/ProDispatch.Examples.MinimalApi/Features/Users/Queries/GetUserById.cs, samples/ProDispatch.Examples.MinimalApi/Features/Users/Queries/GetUserByIdHandler.cs, samples/ProDispatch.Examples.MinimalApi/GlobalUsings.cs, samples/ProDispatch.Examples.MinimalApi/Program.cs, samples/ProDispatch.Examples.MinimalApi/ProDispatch.Examples.MinimalApi.csproj, samples/ProDispatch.Examples.MinimalApi/README.md, FEATURE_ADDITIONS.md
ASP.NET Core minimal API application with OpenAPI/Scalar documentation, demonstrating timing behavior and notification handling
Unit Tests
tests/ProDispatch.Tests/DispatcherTests.cs, tests/ProDispatch.Tests/GlobalUsings.cs, tests/ProDispatch.Tests/ProDispatch.Tests.csproj
Unit tests for dispatcher command/query/notification handling and pipeline behavior ordering
Integration Tests
tests/ProDispatch.IntegrationTests/EndToEndTests.cs, tests/ProDispatch.IntegrationTests/GlobalUsings.cs, tests/ProDispatch.IntegrationTests/ProDispatch.IntegrationTests.csproj
End-to-end integration tests verifying command execution, notification publishing, and event tracking across the full dispatcher pipeline

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant InProcessDispatcher
    participant ServiceFactory
    participant PipelineBehavior as Pipeline Behavior<br/>(Reversed Order)
    participant Handler
    participant Notification as Notification Handler

    Client->>InProcessDispatcher: SendAsync(Command)
    InProcessDispatcher->>ServiceFactory: GetInstance(Handler)
    ServiceFactory-->>InProcessDispatcher: Handler
    InProcessDispatcher->>ServiceFactory: GetInstances(IPipelineBehavior)
    ServiceFactory-->>InProcessDispatcher: [Behavior1, Behavior2]
    
    Note over InProcessDispatcher: Build pipeline chain<br/>in reverse order
    
    InProcessDispatcher->>PipelineBehavior: HandleAsync(request, cancellation, next)
    PipelineBehavior->>PipelineBehavior: Execute logic (validate, log, etc.)
    PipelineBehavior->>Handler: next(request, cancellation)
    Handler->>Handler: HandleAsync(command)
    Handler->>InProcessDispatcher: PublishAsync(Notification)
    
    InProcessDispatcher->>ServiceFactory: GetInstances(INotificationHandler)
    ServiceFactory-->>InProcessDispatcher: [Handler1, Handler2]
    InProcessDispatcher->>Notification: HandleAsync (parallel)
    Notification-->>InProcessDispatcher: Task.WhenAll
    
    Handler-->>PipelineBehavior: Response/Result
    PipelineBehavior-->>InProcessDispatcher: Response/Result
    InProcessDispatcher-->>Client: Task/Task<TResult>
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~100 minutes

Poem

🐰 A dispatcher hops into view,
With behaviors in pipeline queue,
Commands and queries dance in line,
Notifications bloom so fine,
ProDispatch makes in-process flow divine! 📨✨

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant