Curly.EventDriven.Abstractions 1.0.1

Abstractions required by Curly.EventDriven implementations to help you separate your program into distinct sections (separation of concerns).

Install-Package Curly.EventDriven.Abstractions -Version 1.0.1
dotnet add package Curly.EventDriven.Abstractions --version 1.0.1
<PackageReference Include="Curly.EventDriven.Abstractions" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Curly.EventDriven.Abstractions --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Curly.EventDriven.Abstractions

Goal

Abstractions for implementating event driven software.

Package content

  • IEvent
  • IEventBroker
  • IHandle

Usage

  1. Events must implement IEvent.

     public class CustomEvent : IEvent
     {
     	...
     }
    
  2. Use IEventBroker to publish events.

     public CustomClass(IEventBroker eventBroker)
     {
     	_eventBroker = eventBroker;
     }
    
     public void DoSomething()
     {
     	...
     	_eventBroker.Publish(new CustomEvent());
     }
    
  3. Create EventHandlers that implement IHandle&lt;TEvent&gt;.

    public class CustomEventHandler : IHandle<CustomEvent>
     {
     	public void Handle(CustomEvent @event)
     	{
     		...
     	}
     }
    

Example

Check out a simple hello world examle: GitHub - Curly.EventDriven - HelloWorld example

Curly.EventDriven.Abstractions

Goal

Abstractions for implementating event driven software.

Package content

  • IEvent
  • IEventBroker
  • IHandle

Usage

  1. Events must implement IEvent.

     public class CustomEvent : IEvent
     {
     	...
     }
    
  2. Use IEventBroker to publish events.

     public CustomClass(IEventBroker eventBroker)
     {
     	_eventBroker = eventBroker;
     }
    
     public void DoSomething()
     {
     	...
     	_eventBroker.Publish(new CustomEvent());
     }
    
  3. Create EventHandlers that implement IHandle&lt;TEvent&gt;.

    public class CustomEventHandler : IHandle<CustomEvent>
     {
     	public void Handle(CustomEvent @event)
     	{
     		...
     	}
     }
    

Example

Check out a simple hello world examle: GitHub - Curly.EventDriven - HelloWorld example

Release Notes

Initial abstractions for a dead simple event broker implementation which handles all events immediately and synchronously.

  • .NETStandard 2.0

    • No dependencies.

Version History

Version Downloads Last updated
1.0.1 61 4/4/2019
1.0.0 61 4/2/2019