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

nils-org/Topshelf.LightCore

Repository files navigation

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... */
    });
});