Skip to content
This repository was archived by the owner on Sep 8, 2023. It is now read-only.

Latest commit

 

History

History
27 lines (22 loc) · 717 Bytes

File metadata and controls

27 lines (22 loc) · 717 Bytes

Topshelf.LightCore

Logo

LightCore bindings for Topshelf

Howto

// setup LightCore
var builder = new ContainerBuilder();
/* some fancy setup here */
var container = builder.Build();

// setup Topshelf
var host = HostFactory.Run(x =>
{
    x.UseLightCore(container); // Enable LightCore
    x.Service<SomeSevice>(s =>
    {
        s.ConstructUsingLightCore(); // Construct SomeSevice using LightCore
        s.WhenStarted(tc => tc.Start());
        s.WhenStopped(tc => tc.Stop());
        /* more Topshelf code... */
    });
});