Skip to content
simple LightCore bindings for Topshelf
C# PowerShell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
src/Topshelf.LightCore
.gitignore
License.txt
ReadMe.md

ReadMe.md

Topshelf.LightCore

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<FakeSevice>(s =>
    {
        s.ConstructUsingLightCore<ThisServiceWillBeInstanciatedUsingLightCore>(); // Construct service using LightCore
        s.WhenStarted(tc => tc.Start());
        s.WhenStopped(tc => tc.Stop());
        /* more Topshelf code... */
    });
});
You can’t perform that action at this time.