Umbrella.DDD 8.0.0.3085

dotnet add package Umbrella.DDD --version 8.0.0.3085
                    
NuGet\Install-Package Umbrella.DDD -Version 8.0.0.3085
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Umbrella.DDD" Version="8.0.0.3085" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Umbrella.DDD" Version="8.0.0.3085" />
                    
Directory.Packages.props
<PackageReference Include="Umbrella.DDD" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Umbrella.DDD --version 8.0.0.3085
                    
#r "nuget: Umbrella.DDD, 8.0.0.3085"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Umbrella.DDD@8.0.0.3085
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Umbrella.DDD&version=8.0.0.3085
                    
Install as a Cake Addin
#tool nuget:?package=Umbrella.DDD&version=8.0.0.3085
                    
Install as a Cake Tool

Repository Content

Library to implement a light-weight Framework for Domain Driven Design

Build Status Quality Gate Status Security Rating Maintainability Rating Reliability Rating Vulnerabilities Bugs

To install it, use proper command:

dotnet add package Umbrella.DDD
dotnet add package Umbrella.DDD.GCP

Umbrella.DDD: Nuget NuGet Downloads

Umbrella.DDD.GCP: Nuget NuGet Downloads

For more details about download, see NuGet Web Site

Configuration

to configure properly the application, it's necessary to add the section to ppSettings.json file as the example below:

{
 "UmbrellaMessageBus": {
    "PublisherName": "InMemory"
  },
}

where we have:

  • PublisherName: name of the provider for the publisher component. Valid names: [InMemory,PubSub]

Usage

for the usage of the library, please refer to extension methods.

<b>Standard usage</b>


services.AddInMemoryEventPublisher();
services.AddEventHanders(new MyMessageBusDependencyResolver());
services.AddMessageBus();

Based on the snippet, some important notice:

  • AddInMemoryEventPublisher: it should be avoided for PROD environments
  • AddEventHanders: it scans the assembly to inject dynamically IMessageHandler and ISaga components
  • instruction AddMessageBus should be states after all DI injections

<b>Publishing message on Google Pub Sub</b>


services.AddPubSubEventPublisher("umbrella-proj-id");
services.AddEventHanders(new MyMessageBusDependencyResolver());
services.AddMessageBus();

Using PubSub publisher, you are decoupling the publish action to handler action. the message will be handled asyncronously.

Application Modules

to simplify the aggregation of assemblies into MOdules (or generically speaking Domains), IApplicationModuleProvider is provided. implementig such interface per Domain, you can easily setup your dependencies across domain assemly, infrastructure, ecc. Here you find a simple snippet:


services.AddApplicationModules(new MyApplicationModuleProvider())

How to add an Event Handler

To implement a new event handler, you have to follow the snippet below:

   /// <summary>
    /// Handlers to manage episode creations
    /// </summary>
    internal class TestEventHandler : MessageHandler<TestEventOccurred>
    {
        /// <summary>
        /// Default COnstr
        /// </summary>
        /// <param name="logger"></param>
        /// <param name="repo"></param>
        public TestEventHandler(ILogger logger) : base(logger)
        {
        }
        /// <summary>
        /// handels the msg
        /// </summary>
        /// <param name="message"></param>
        public override void HandleThisMessage(TestEventOccurred message)
        {
            this._Logger.LogInformation("Handling message {message}", message);

            . . . .

            this._Logger.LogInformation("Message succesfully handled");
        }
    }

then register the handler using a custom extension linke the one below:

        /// <summary>
        /// Adds domains ervices
        /// </summary>
        /// <param name="services"></param>
        public static void AddMyDomainEventHandlers(this IServiceCollection services)
        {
            services.AddScoped<IMessageHandler TestEventHandler>();
            // add here other domain event handlers
            // . . .
        }

Please notice that you handlers must to be registered aas IMessageHandler.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Umbrella.DDD:

Package Downloads
Umbrella.DDD.GCP

Library to implement GCP concrete component defined from Umbrella.DDD library

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.0.3085 291 7/11/2024
2.0.0.2792 445 8/2/2023
1.3.0.2469 769 2/11/2023
1.2.0.2437 618 1/26/2023
1.1.0.2401 638 1/14/2023
1.1.0.2390 746 1/14/2023 1.1.0.2390 is deprecated.
1.0.2.2365 764 1/5/2023 1.0.2.2365 is deprecated.
1.0.1.2301 766 12/29/2022 1.0.1.2301 is deprecated.
1.0.0.2286 820 12/24/2022 1.0.0.2286 is deprecated.
0.9.0.2267 1,066 12/23/2022