Bajonczak.Events 1.0.0

.NET 5.0
NuGet\Install-Package Bajonczak.Events -Version 1.0.0
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.
dotnet add package Bajonczak.Events --version 1.0.0
<PackageReference Include="Bajonczak.Events" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bajonczak.Events --version 1.0.0
#r "nuget: Bajonczak.Events, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Bajonczak.Events as a Cake Addin
#addin nuget:?package=Bajonczak.Events&version=1.0.0

// Install Bajonczak.Events as a Cake Tool
#tool nuget:?package=Bajonczak.Events&version=1.0.0

Message Base Events

A simple exensible package with Event definitions logging extension.

This Package include some common generic base events for the most common messages. It also use the ILogger form dot.net to support structural logging of the action within the process itself.

Give a star! ⭐

If you like it or using thie project give a star. Thanks!

Usage

    ILogger _logger;
    .
    .
    .
    using (var scope = this._logger.CorrelatedScope())
    {
        var myCowoker = new CoWorker(){
            FirstName="Johnny",
            LastName="Developer"
        }
        logger.LogInformation("My Logtest");
        var createdEvent = new ItemCreated(myCoWorker);
        // Set the correlation from the scope
        scope.ApplyCorrelationID(createdEvent);

        // use this to send the event
        mymessageServiceimp.SendMessage(createdEvent);
    }

In this example you will create a scoped logging area. So that all logs that will be produced will be enriched with the correlation id.

It will also apply the generated correlation ID to the event object to. This will be a minimal sample, you can also take an existing message to takeover the correlation from the whole process itself

var scope = this._logger.CorrelatedScope(incommingMessage);

Supported Message Types

  • ItemChanged (Event that will be used for tracking changes. It will hold the before and after item from the change process)
  • ItemCreated (Event will be used, when an element was created. It will hold the created event)
  • ItemDeleted (Event will be used AFTER the deletion process ocrrued. It will contain the deleted event)
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 179 11/16/2021