Skip to content

rvanmaanen/Paramore.Brighter.AspNetCore

 
 

Repository files navigation

Paramore.Brighter.AspNetCore

ASP.NET Core integration for Brighter.

Build status NuGet

Usage

In your ConfigureServices method, use AddBrighter to add Brighter to the container.

// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
    // Add Brighter.
    services.AddBrighter()
        .AsyncHandlersFromAssemblies(typeof(CreateFooHandler).Assembly);

    // Add framework services.
    services.AddMvc();
}

You can customize Brighter by configuring BrighterOptions:

// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
    // Add Brighter.
    services.AddBrighter(opts =>
        {
            opts.RequestContextFactory = new MyCustomRequestContextFactory();
            opts.PolicyRegistry = new MyCustomPolicies();
            opts.MessagingConfiguration = new MyTaskQueues();
        })
    .AsyncHandlersFromAssemblies(typeof(CreateFooHandler).Assembly);

    // Add framework services.
    services.AddMvc();
}

About

ASP.NET Core integration for Brighter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%