Skip to content

Instantly share code, notes, and snippets.

@cammerman
Created February 7, 2011 02:11
Show Gist options
  • Save cammerman/813921 to your computer and use it in GitHub Desktop.
Save cammerman/813921 to your computer and use it in GitHub Desktop.
Install bootstrapper v2
using System.ServiceProcess;
using System.Configuration.Install;
using Autofac;
namespace HelloSvc
{
using Install;
internal class InstallBootstrapper
{
public IContainer Build()
{
var builder = new ContainerBuilder();
builder
.RegisterType<HelloServiceProcessInstaller>()
.As<Installer>()
.InstancePerLifetimeScope();
builder
.RegisterType<Services.GreetServiceInstaller>()
.As<Installer>()
.InstancePerLifetimeScope();
return builder.Build();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment