diff --git a/.editorconfig b/.editorconfig
index 82d0bab..7682014 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -45,7 +45,7 @@ insert_final_newline = true
[*.cs]
#### File Header Template ####
-file_header_template = This Source Code Form is subject to the terms of the MIT License.\nIf a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.\nCopyright (C) Leszek Pomianowski and ReflectionEventing Contributors.\nAll Rights Reserved.
+file_header_template = This Source Code Form is subject to the terms of the MIT License.\nIf a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.\nCopyright (C) Leszek Pomianowski and CommandQuerySegregation Contributors.\nAll Rights Reserved.
#### .NET Coding Conventions ####
diff --git a/.github/labeler.yml b/.github/labeler.yml
index d7a3c8f..4921ffe 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -22,7 +22,7 @@ update:
NuGet:
- changed-files:
- - any-glob-to-any-file: [ 'src/ReflectionEventing/**', 'src/Directory.Packages.props' ]
+ - any-glob-to-any-file: [ 'src/CommandQuerySegregation/**', 'src/Directory.Packages.props' ]
dependencies:
- changed-files:
diff --git a/.github/workflows/reflection-events-cd-nuget.yaml b/.github/workflows/cqs-cd-nuget.yaml
similarity index 73%
rename from .github/workflows/reflection-events-cd-nuget.yaml
rename to .github/workflows/cqs-cd-nuget.yaml
index f677aba..63e07a3 100644
--- a/.github/workflows/reflection-events-cd-nuget.yaml
+++ b/.github/workflows/cqs-cd-nuget.yaml
@@ -1,4 +1,4 @@
-name: reflection-events-client-cd-nuget
+name: cqs-cd-nuget
on:
push:
@@ -26,10 +26,10 @@ jobs:
run: dotnet restore
- name: Build
- run: dotnet build ReflectionEventing.sln --configuration Release --no-restore -p:SourceLinkEnabled=true
+ run: dotnet build CommandQuerySegregation.sln --configuration Release --no-restore -p:SourceLinkEnabled=true
- name: Run tests
- run: dotnet test ReflectionEventing.sln --configuration Release --no-restore --no-build --verbosity quiet
+ run: dotnet test CommandQuerySegregation.sln --configuration Release --no-restore --no-build --verbosity quiet
- name: Publish the package to NuGet.org
run: nuget push **\*.nupkg -NonInteractive -SkipDuplicate -Source 'https://api.nuget.org/v3/index.json'
diff --git a/.github/workflows/reflection-events-labeler.yaml b/.github/workflows/cqs-labeler.yaml
similarity index 88%
rename from .github/workflows/reflection-events-labeler.yaml
rename to .github/workflows/cqs-labeler.yaml
index a5d7d98..d8030e1 100644
--- a/.github/workflows/reflection-events-labeler.yaml
+++ b/.github/workflows/cqs-labeler.yaml
@@ -1,4 +1,4 @@
-name: reflection-events-labeler
+name: cqs-labeler
on:
- pull_request_target
diff --git a/.github/workflows/reflection-events-pr-validator.yaml b/.github/workflows/cqs-pr-validator.yaml
similarity index 72%
rename from .github/workflows/reflection-events-pr-validator.yaml
rename to .github/workflows/cqs-pr-validator.yaml
index ed42d7a..c5adcef 100644
--- a/.github/workflows/reflection-events-pr-validator.yaml
+++ b/.github/workflows/cqs-pr-validator.yaml
@@ -1,4 +1,4 @@
-name: reflection-events-pr-validator
+name: cqs-pr-validator
on:
pull_request:
@@ -29,7 +29,7 @@ jobs:
run: dotnet restore
- name: Build
- run: dotnet build ReflectionEventing.sln --configuration Release --no-restore
+ run: dotnet build CommandQuerySegregation.sln --configuration Release --no-restore
- name: Run tests
- run: dotnet test ReflectionEventing.sln --configuration Release --no-restore --no-build --verbosity quiet
+ run: dotnet test CommandQuerySegregation.sln --configuration Release --no-restore --no-build --verbosity quiet
diff --git a/CommandQuerySegregation.sln b/CommandQuerySegregation.sln
new file mode 100644
index 0000000..279ea29
--- /dev/null
+++ b/CommandQuerySegregation.sln
@@ -0,0 +1,37 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.9.34728.123
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommandQuerySegregation", "src\CommandQuerySegregation\CommandQuerySegregation.csproj", "{F5FF47B8-A0CC-4F20-A848-AEEF51D4C2C7}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3D12BBC8-E962-4230-AA5F-C97BDCB7AB24}"
+ ProjectSection(SolutionItems) = preProject
+ .editorconfig = .editorconfig
+ Directory.Build.props = Directory.Build.props
+ Directory.Build.targets = Directory.Build.targets
+ Directory.Packages.props = Directory.Packages.props
+ nuget.config = nuget.config
+ README.md = README.md
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{7A58AE12-65AA-4E1B-B5DB-CBD2732D1AE7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F5FF47B8-A0CC-4F20-A848-AEEF51D4C2C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F5FF47B8-A0CC-4F20-A848-AEEF51D4C2C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F5FF47B8-A0CC-4F20-A848-AEEF51D4C2C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F5FF47B8-A0CC-4F20-A848-AEEF51D4C2C7}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {B017BA78-67A5-4D0F-92A3-671B0D8A2911}
+ EndGlobalSection
+EndGlobal
diff --git a/Contributing.md b/Contributing.md
index c29f6d7..8d2ce14 100644
--- a/Contributing.md
+++ b/Contributing.md
@@ -1,36 +1,36 @@
-# ✨ Contributing to the ReflectionEventing
+# ✨ Contributing to the CommandQuerySegregation
-Thank you for exhibiting interest in contributing to the ReflectionEventing. The team is delighted to welcome you onboard to our exciting and growing project. Any contribution or value added go a long way to enhance the project!
+Thank you for exhibiting interest in contributing to the CommandQuerySegregation. The team is delighted to welcome you onboard to our exciting and growing project. Any contribution or value added go a long way to enhance the project!
-In the next few steps, you will be able to see a glimpse of ways you can contribute to the ReflectionEventing.
+In the next few steps, you will be able to see a glimpse of ways you can contribute to the CommandQuerySegregation.
## ❔ Questions
-Due to the high volume of incoming issues please keep our GitHub issues for bug reports and feature requests. For general questions, there is a higher chance of getting your question answered on [StackOverflow](https://stackoverflow.com/questions/tagged/lepo-reflection-eventing) where questions should be tagged with the tag `lepo-reflection-eventing`.
+Due to the high volume of incoming issues please keep our GitHub issues for bug reports and feature requests. For general questions, there is a higher chance of getting your question answered on [StackOverflow](https://stackoverflow.com/questions/tagged/lepo-cqs) where questions should be tagged with the tag `lepo-cqs`.
## 🐛 Fix a Bug
-If you find any bug, you can help the community by [submitting an issue](https://github.com/lepoco/reflectioneventing/issues/new?labels=bug+:bug:&title=[Bug]). Once the issue is filed, feel free to start working on the PR and submit a PR.
+If you find any bug, you can help the community by [submitting an issue](https://github.com/lepoco/cqs/issues/new?labels=bug+:bug:&title=[Bug]). Once the issue is filed, feel free to start working on the PR and submit a PR.
## 👌 Good First Issue
-If this is your first time contributing to the ReflectionEventing (_WCT_) and do not have advanced level programming experience, we have got you covered 💥 WCT has a list of [good first issue](https://github.com/lepoco/reflectioneventing/labels/good%20first%20issue) that can be a great entryway to find and fix any issues that best fit your expertise or technical background.
+If this is your first time contributing to the CommandQuerySegregation (_WCT_) and do not have advanced level programming experience, we have got you covered 💥 WCT has a list of [good first issue](https://github.com/lepoco/cqs/labels/good%20first%20issue) that can be a great entryway to find and fix any issues that best fit your expertise or technical background.
## 🙋 Help Wanted
-WCT also has a list of issues that are labeled as [help wanted](https://github.com/lepoco/reflectioneventing/labels/help%20wanted). The level of complexity in the list can vary but if you have an advanced level of programming experience, feel free to jump in to solve these issues.
+WCT also has a list of issues that are labeled as [help wanted](https://github.com/lepoco/cqs/labels/help%20wanted). The level of complexity in the list can vary but if you have an advanced level of programming experience, feel free to jump in to solve these issues.
## 📬 Add New Feature
-* To contribute a new feature, fill out the [Feature Request Template](https://github.com/lepoco/reflectioneventing/issues/new?template=feature_request.md&labels=feature+request+:mailbox_with_mail:&title=[Feature]) and provide detailed information to express the proposal.
+* To contribute a new feature, fill out the [Feature Request Template](https://github.com/lepoco/cqs/issues/new?template=feature_request.md&labels=feature+request+:mailbox_with_mail:&title=[Feature]) and provide detailed information to express the proposal.
* Once the Feature Request is submitted, it will be open for discussion.
* If it gets approved by the team, proceed to submit a PR of the proposed Feature.
* If the PR contains an error-free code and the reviewer signs off, the PR will be merged.
## 🚀 Create, Submit or Review Pull Request
-Anyone can create a Pull Request by forking the ReflectionEventing Repository. Here is how you can [Create a Pull Request from fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork). Once you fork the ReflectionEventing repo, it is essential to create all changes in the feature branch of your forked repository. If you have the changes in the forked feature branch, you can then create a Pull Request in the main ReflectionEventing.
+Anyone can create a Pull Request by forking the CommandQuerySegregation Repository. Here is how you can [Create a Pull Request from fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork). Once you fork the CommandQuerySegregation repo, it is essential to create all changes in the feature branch of your forked repository. If you have the changes in the forked feature branch, you can then create a Pull Request in the main CommandQuerySegregation.
## 💙 Thank You
-**Thank you so much for contributing to this amazing project. We hope you will continue to add value and find yourself as a highly reliable source to the ReflectionEventing.**
+**Thank you so much for contributing to this amazing project. We hope you will continue to add value and find yourself as a highly reliable source to the CommandQuerySegregation.**
diff --git a/Directory.Build.props b/Directory.Build.props
index 22b9c07..fb7da87 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -6,21 +6,22 @@
- 3.0.1
+ 1.0.0
+ 1.0.0-preview.1lepo.colepo.co
- ReflectionEventing
- lepoco;events;eventing;reflection;client;toolkit;extensions;bus;eventbus;messages
+ CommandQuerySegregation
+ lepoco;commands;queries;bus;messagesMITtrue(c) lepo.co | Leszek Pomianowski and Contributors. All rights reserved.
- https://github.com/lepoco/reflectioneventing
- https://github.com/lepoco/reflectioneventing/releases
+ https://github.com/lepoco/cqs
+ https://github.com/lepoco/cqs/releasesIcon.png
- https://github.com/lepoco/reflectioneventing/main/build/nuget.png
+ https://github.com/lepoco/cqs/main/build/nuget.png
diff --git a/LICENSE b/LICENSE
index a5c757f..f979f83 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2024 Leszek Pomianowski and ReflectionEventing Contributors. https://dev.lepo.co/
+Copyright (c) 2024 Leszek Pomianowski and CommandQuerySegregation Contributors. https://dev.lepo.co/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/LICENSE.md b/LICENSE.md
index a5c757f..f979f83 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2024 Leszek Pomianowski and ReflectionEventing Contributors. https://dev.lepo.co/
+Copyright (c) 2024 Leszek Pomianowski and CommandQuerySegregation Contributors. https://dev.lepo.co/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 8c7a208..1fd4816 100644
--- a/README.md
+++ b/README.md
@@ -1,95 +1,40 @@
-# 🚎 ReflectionEventing
+# 🚎 CommandQuerySegregation
[Created with ❤ in Poland by lepo.co](https://dev.lepo.co/)
-ReflectionEventing is a powerful tool for developers looking to create decoupled designs in WPF, WinForms, or CLI applications. By leveraging the power of Dependency Injection (DI) and eventing, ReflectionEventing promotes better Inversion of Control (IoC), reducing coupling and enhancing the modularity and flexibility of your applications.
+Elevate your application's command and query responsibilities. CommandQuerySegregation provides intuitive interfaces and classes for implementing Command Query Responsibility Segregation (CQRS) in .NET applications. It facilitates clear separation of command and query operations, promoting clean architecture and enhanced maintainability.
-[![GitHub license](https://img.shields.io/github/license/lepoco/reflectioneventing)](https://github.com/lepoco/reflectioneventing/blob/master/LICENSE) [![Nuget](https://img.shields.io/nuget/v/ReflectionEventing)](https://www.nuget.org/packages/ReflectionEventing/) [![Nuget](https://img.shields.io/nuget/dt/ReflectionEventing?label=nuget)](https://www.nuget.org/packages/ReflectionEventing/) [![Sponsors](https://img.shields.io/github/sponsors/lepoco)](https://github.com/sponsors/lepoco)
+[![GitHub license](https://img.shields.io/github/license/lepoco/cqs)](https://github.com/lepoco/cqs/blob/master/LICENSE) [![Nuget](https://img.shields.io/nuget/v/CommandQuerySegregation)](https://www.nuget.org/packages/CommandQuerySegregation/) [![Nuget](https://img.shields.io/nuget/dt/CommandQuerySegregation?label=nuget)](https://www.nuget.org/packages/CommandQuerySegregation/) [![Sponsors](https://img.shields.io/github/sponsors/lepoco)](https://github.com/sponsors/lepoco)
## 👀 What does this repo contain?
-This repository houses the source code for the ReflectionEventing NuGet package. The package utilizes C# reflection to register services that can listen for and respond to local events.
+This repository houses the source code for the CommandQuerySegregation NuGet package.
## Gettings started
-ReflectionEventing is available as NuGet package on NuGet.org:
-https://www.nuget.org/packages/ReflectionEventing
-https://www.nuget.org/packages/ReflectionEventing.Autofac
-https://www.nuget.org/packages/ReflectionEventing.Castle.Windsor
-https://www.nuget.org/packages/ReflectionEventing.DependencyInjection
-https://www.nuget.org/packages/ReflectionEventing.Ninject
-https://www.nuget.org/packages/ReflectionEventing.Unity
+CommandQuerySegregation is available as NuGet package on NuGet.org:
+https://www.nuget.org/packages/CommandQuerySegregation
You can add it to your project using .NET CLI:
```powershell
-dotnet add package ReflectionEventing.DependencyInjection
+dotnet add package CommandQuerySegregation
```
, or package manager console:
```powershell
-NuGet\Install-Package ReflectionEventing.DependencyInjection
+NuGet\Install-Package CommandQuerySegregation
```
-### 🛠️ How to Use ReflectionEventing
-
-#### 1. Register Consumers and the Event Bus
-
-In this step, we register our ViewModel as a singleton and add it as a consumer to the event bus. This allows the ViewModel to listen for events published on the bus.
-
-```csharp
-IHost host = Host.CreateDefaultBuilder()
- .ConfigureServices((context, services) =>
- {
- services.AddSingleton();
- services.AddEventBus(e =>
- {
- e.AddConsumer();
- });
- }
- )
- .Build();
-```
-
-#### 2. Publish Events
-
-Here, we create a background service that publishes an event on the event bus. This event could be anything - in this case, we're publishing a `BackgroundTicked` event.
-
-```csharp
-public class MyBackgroundService(IEventBus eventBus)
-{
- public void PublishEvent()
- {
- eventBus.Publish(new BackgroundTicked());
- }
-}
-```
-
-#### 3. Listen for Events
-
-Finally, we implement the `IConsumer` interface in our ViewModel. This allows the ViewModel to consume `BackgroundTicked` events. When a `BackgroundTicked` event is published, the `ConsumeAsync` method is called, and we update the `CurrentTick` property.
-
-```csharp
-public partial class MainWindowViewModel : ObservableObject, IConsumer
-{
- [ObservableProperty]
- private int _currentTick = 0;
-
- public Task ConsumeAsync(BackgroundTicked payload, CancellationToken cancellationToken)
- {
- CurrentTick = payload.Value;
-
- return Task.CompletedTask;
- }
-}
-```
+### 🛠️ How to Use CommandQuerySegregation
+tba
## Compilation
To build the project, use Visual Studio 2022 and open the .sln file.
Visual Studio
-**ReflectionEventing** is an Open Source project. You are entitled to download and use the freely available Visual Studio Community Edition to build, run or develop for ReflectionEventing. As per the Visual Studio Community Edition license, this applies regardless of whether you are an individual or a corporate user.
+**CommandQuerySegregation** is an Open Source project. You are entitled to download and use the freely available Visual Studio Community Edition to build, run or develop for CommandQuerySegregation. As per the Visual Studio Community Edition license, this applies regardless of whether you are an individual or a corporate user.
## Code of Conduct
@@ -97,5 +42,5 @@ This project has adopted the code of conduct defined by the Contributor Covenant
## License
-**ReflectionEventing** is free and open source software licensed under **MIT License**. You can use it in private and commercial projects.
+**CommandQuerySegregation** is free and open source software licensed under **MIT License**. You can use it in private and commercial projects.
Keep in mind that you must include a copy of the license in your project.
diff --git a/ReflectionEventing.sln b/ReflectionEventing.sln
deleted file mode 100644
index fa371f8..0000000
--- a/ReflectionEventing.sln
+++ /dev/null
@@ -1,117 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.9.34728.123
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReflectionEventing", "src\ReflectionEventing\ReflectionEventing.csproj", "{F5FF47B8-A0CC-4F20-A848-AEEF51D4C2C7}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReflectionEventing.Demo.Wpf", "src\ReflectionEventing.Demo.Wpf\ReflectionEventing.Demo.Wpf.csproj", "{898865CB-C39C-4E69-9FF8-E96AAD7FF0A4}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3D12BBC8-E962-4230-AA5F-C97BDCB7AB24}"
- ProjectSection(SolutionItems) = preProject
- .editorconfig = .editorconfig
- Directory.Build.props = Directory.Build.props
- Directory.Build.targets = Directory.Build.targets
- Directory.Packages.props = Directory.Packages.props
- nuget.config = nuget.config
- README.md = README.md
- EndProjectSection
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReflectionEventing.Autofac", "src\ReflectionEventing.Autofac\ReflectionEventing.Autofac.csproj", "{6023E50F-2B4D-4315-B85D-9E8A12746045}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReflectionEventing.DependencyInjection", "src\ReflectionEventing.DependencyInjection\ReflectionEventing.DependencyInjection.csproj", "{09F0D6A2-3791-4173-A612-98E6EA92FCC4}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{7A58AE12-65AA-4E1B-B5DB-CBD2732D1AE7}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReflectionEventing.UnitTests", "tests\ReflectionEventing.UnitTests\ReflectionEventing.UnitTests.csproj", "{7F506A5A-1F70-49CB-B371-428DFA573451}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReflectionEventing.Autofac.UnitTests", "tests\ReflectionEventing.Autofac.UnitTests\ReflectionEventing.Autofac.UnitTests.csproj", "{E5C7D945-F96C-4C05-9C12-4DB246E207CB}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReflectionEventing.DependencyInjection.UnitTests", "tests\ReflectionEventing.DependencyInjection.UnitTests\ReflectionEventing.DependencyInjection.UnitTests.csproj", "{CF2E3E06-48A3-47F7-B152-E86F25C9A182}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReflectionEventing.Ninject", "src\ReflectionEventing.Ninject\ReflectionEventing.Ninject.csproj", "{194CA822-C3D6-4FBC-989A-039A0B97F2A8}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReflectionEventing.Ninject.UnitTests", "tests\ReflectionEventing.Ninject.UnitTests\ReflectionEventing.Ninject.UnitTests.csproj", "{A741FC02-03AE-4A34-AAA0-FBFBAB93377D}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReflectionEventing.Unity", "src\ReflectionEventing.Unity\ReflectionEventing.Unity.csproj", "{EBE050AC-CE99-49E0-9836-361D9F0DB515}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReflectionEventing.Unity.UnitTests", "tests\ReflectionEventing.Unity.UnitTests\ReflectionEventing.Unity.UnitTests.csproj", "{772AA314-8522-4A95-A99B-E69A867704DC}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReflectionEventing.Castle.Windsor", "src\ReflectionEventing.Castle.Windsor\ReflectionEventing.Castle.Windsor.csproj", "{DEBBE7D1-7F8A-4013-9BA7-C721AB8A1E1B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReflectionEventing.Castle.Windsor.UnitTests", "tests\ReflectionEventing.Castle.Windsor.UnitTests\ReflectionEventing.Castle.Windsor.UnitTests.csproj", "{8D24CF24-984D-4500-B99E-711DFBF64A92}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {F5FF47B8-A0CC-4F20-A848-AEEF51D4C2C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F5FF47B8-A0CC-4F20-A848-AEEF51D4C2C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F5FF47B8-A0CC-4F20-A848-AEEF51D4C2C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F5FF47B8-A0CC-4F20-A848-AEEF51D4C2C7}.Release|Any CPU.Build.0 = Release|Any CPU
- {898865CB-C39C-4E69-9FF8-E96AAD7FF0A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {898865CB-C39C-4E69-9FF8-E96AAD7FF0A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {898865CB-C39C-4E69-9FF8-E96AAD7FF0A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {898865CB-C39C-4E69-9FF8-E96AAD7FF0A4}.Release|Any CPU.Build.0 = Release|Any CPU
- {6023E50F-2B4D-4315-B85D-9E8A12746045}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6023E50F-2B4D-4315-B85D-9E8A12746045}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6023E50F-2B4D-4315-B85D-9E8A12746045}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6023E50F-2B4D-4315-B85D-9E8A12746045}.Release|Any CPU.Build.0 = Release|Any CPU
- {09F0D6A2-3791-4173-A612-98E6EA92FCC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {09F0D6A2-3791-4173-A612-98E6EA92FCC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {09F0D6A2-3791-4173-A612-98E6EA92FCC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {09F0D6A2-3791-4173-A612-98E6EA92FCC4}.Release|Any CPU.Build.0 = Release|Any CPU
- {7F506A5A-1F70-49CB-B371-428DFA573451}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7F506A5A-1F70-49CB-B371-428DFA573451}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7F506A5A-1F70-49CB-B371-428DFA573451}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7F506A5A-1F70-49CB-B371-428DFA573451}.Release|Any CPU.Build.0 = Release|Any CPU
- {E5C7D945-F96C-4C05-9C12-4DB246E207CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E5C7D945-F96C-4C05-9C12-4DB246E207CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E5C7D945-F96C-4C05-9C12-4DB246E207CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E5C7D945-F96C-4C05-9C12-4DB246E207CB}.Release|Any CPU.Build.0 = Release|Any CPU
- {CF2E3E06-48A3-47F7-B152-E86F25C9A182}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CF2E3E06-48A3-47F7-B152-E86F25C9A182}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CF2E3E06-48A3-47F7-B152-E86F25C9A182}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CF2E3E06-48A3-47F7-B152-E86F25C9A182}.Release|Any CPU.Build.0 = Release|Any CPU
- {194CA822-C3D6-4FBC-989A-039A0B97F2A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {194CA822-C3D6-4FBC-989A-039A0B97F2A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {194CA822-C3D6-4FBC-989A-039A0B97F2A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {194CA822-C3D6-4FBC-989A-039A0B97F2A8}.Release|Any CPU.Build.0 = Release|Any CPU
- {A741FC02-03AE-4A34-AAA0-FBFBAB93377D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A741FC02-03AE-4A34-AAA0-FBFBAB93377D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A741FC02-03AE-4A34-AAA0-FBFBAB93377D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A741FC02-03AE-4A34-AAA0-FBFBAB93377D}.Release|Any CPU.Build.0 = Release|Any CPU
- {EBE050AC-CE99-49E0-9836-361D9F0DB515}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EBE050AC-CE99-49E0-9836-361D9F0DB515}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EBE050AC-CE99-49E0-9836-361D9F0DB515}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EBE050AC-CE99-49E0-9836-361D9F0DB515}.Release|Any CPU.Build.0 = Release|Any CPU
- {772AA314-8522-4A95-A99B-E69A867704DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {772AA314-8522-4A95-A99B-E69A867704DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {772AA314-8522-4A95-A99B-E69A867704DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {772AA314-8522-4A95-A99B-E69A867704DC}.Release|Any CPU.Build.0 = Release|Any CPU
- {DEBBE7D1-7F8A-4013-9BA7-C721AB8A1E1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DEBBE7D1-7F8A-4013-9BA7-C721AB8A1E1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DEBBE7D1-7F8A-4013-9BA7-C721AB8A1E1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DEBBE7D1-7F8A-4013-9BA7-C721AB8A1E1B}.Release|Any CPU.Build.0 = Release|Any CPU
- {8D24CF24-984D-4500-B99E-711DFBF64A92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8D24CF24-984D-4500-B99E-711DFBF64A92}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8D24CF24-984D-4500-B99E-711DFBF64A92}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8D24CF24-984D-4500-B99E-711DFBF64A92}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {7F506A5A-1F70-49CB-B371-428DFA573451} = {7A58AE12-65AA-4E1B-B5DB-CBD2732D1AE7}
- {E5C7D945-F96C-4C05-9C12-4DB246E207CB} = {7A58AE12-65AA-4E1B-B5DB-CBD2732D1AE7}
- {CF2E3E06-48A3-47F7-B152-E86F25C9A182} = {7A58AE12-65AA-4E1B-B5DB-CBD2732D1AE7}
- {A741FC02-03AE-4A34-AAA0-FBFBAB93377D} = {7A58AE12-65AA-4E1B-B5DB-CBD2732D1AE7}
- {772AA314-8522-4A95-A99B-E69A867704DC} = {7A58AE12-65AA-4E1B-B5DB-CBD2732D1AE7}
- {8D24CF24-984D-4500-B99E-711DFBF64A92} = {7A58AE12-65AA-4E1B-B5DB-CBD2732D1AE7}
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {B017BA78-67A5-4D0F-92A3-671B0D8A2911}
- EndGlobalSection
-EndGlobal
diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt
index 3164748..5127949 100644
--- a/ThirdPartyNotices.txt
+++ b/ThirdPartyNotices.txt
@@ -1,4 +1,4 @@
-ReflectionEventing
+CommandQuerySegregation
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
Do Not Translate or Localize
diff --git a/build/nuget.png b/build/nuget.png
index 7c66e73..111f86d 100644
Binary files a/build/nuget.png and b/build/nuget.png differ
diff --git a/src/ReflectionEventing/ReflectionEventing.csproj b/src/CommandQuerySegregation/CommandQuerySegregation.csproj
similarity index 76%
rename from src/ReflectionEventing/ReflectionEventing.csproj
rename to src/CommandQuerySegregation/CommandQuerySegregation.csproj
index 3a3b1be..ba981a3 100644
--- a/src/ReflectionEventing/ReflectionEventing.csproj
+++ b/src/CommandQuerySegregation/CommandQuerySegregation.csproj
@@ -1,12 +1,13 @@
- ReflectionEventing
+ CommandQuerySegregationnetstandard2.0;netstandard2.1;net462;net6.0;net8.0truetruetrue
- By leveraging the power of Dependency Injection (DI) and eventing, ReflectionEventing promotes better Inversion of Control (IoC), reducing coupling and enhancing the modularity and flexibility of your applications.
+ About
+ Elevate your application's command and query responsibilities. CommandQuerySegregation provides intuitive interfaces and classes for implementing Command Query Responsibility Segregation (CQRS) in .NET applications. It facilitates clear separation of command and query operations, promoting clean architecture and enhanced maintainability.
diff --git a/src/CommandQuerySegregation/ICommandBus.cs b/src/CommandQuerySegregation/ICommandBus.cs
new file mode 100644
index 0000000..30b7d17
--- /dev/null
+++ b/src/CommandQuerySegregation/ICommandBus.cs
@@ -0,0 +1,29 @@
+// This Source Code Form is subject to the terms of the MIT License.
+// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
+// Copyright (C) Leszek Pomianowski and CommandQuerySegregation Contributors.
+// All Rights Reserved.
+
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CommandQuerySegregation;
+
+///
+/// Defines a contract for a command bus in a Command Query Responsibility Segregation (CQRS) pattern.
+///
+///
+/// A command bus is responsible for dispatching commands to their appropriate handlers.
+///
+public interface ICommandBus
+{
+ ///
+ /// Executes the given command asynchronously.
+ ///
+ /// The type of the command to execute.
+ /// The type of the result that the command returns.
+ /// The command to execute.
+ /// A cancellation token that can be used to cancel the work.
+ /// A task that represents the asynchronous operation.
+ Task ExecuteAsync(TCommand command, CancellationToken cancellationToken)
+ where TCommand : class;
+}
diff --git a/src/CommandQuerySegregation/IQueryBus.cs b/src/CommandQuerySegregation/IQueryBus.cs
new file mode 100644
index 0000000..05c447a
--- /dev/null
+++ b/src/CommandQuerySegregation/IQueryBus.cs
@@ -0,0 +1,29 @@
+// This Source Code Form is subject to the terms of the MIT License.
+// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
+// Copyright (C) Leszek Pomianowski and CommandQuerySegregation Contributors.
+// All Rights Reserved.
+
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CommandQuerySegregation;
+
+///
+/// Defines a contract for a query bus in a Command Query Responsibility Segregation (CQRS) pattern.
+///
+///
+/// A query bus is responsible for dispatching queries to their appropriate handlers.
+///
+public interface IQueryBus
+{
+ ///
+ /// Executes the given query asynchronously.
+ ///
+ /// The type of the query to execute.
+ /// The type of the result that the query returns.
+ /// The query to execute.
+ /// A cancellation token that can be used to cancel the work.
+ /// A task that represents the asynchronous operation.
+ Task ExecuteAsync(TQuery query, CancellationToken cancellationToken)
+ where TQuery : class;
+}
diff --git a/src/ReflectionEventing.Autofac/AutofacConsumerProvider.cs b/src/ReflectionEventing.Autofac/AutofacConsumerProvider.cs
deleted file mode 100644
index c416972..0000000
--- a/src/ReflectionEventing.Autofac/AutofacConsumerProvider.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-// This Source Code Form is subject to the terms of the MIT License.
-// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
-// Copyright (C) Leszek Pomianowski and ReflectionEventing Contributors.
-// All Rights Reserved.
-
-using Autofac;
-
-namespace ReflectionEventing.Autofac;
-
-///
-/// Provides event consumers for Autofac.
-///
-public class AutofacConsumerProvider(ILifetimeScope lifetimeScope) : IConsumerProvider
-{
- ///
- public IEnumerable