Skip to content

Instantly share code, notes, and snippets.

@cammerman
Created February 7, 2011 02:57
Show Gist options
  • Save cammerman/813944 to your computer and use it in GitHub Desktop.
Save cammerman/813944 to your computer and use it in GitHub Desktop.
Service app mainline
using System.ServiceProcess;
using Autofac;
namespace HelloSvc
{
public static class Program
{
public static void Main(String[] args)
{
var iocBootstrap = new ServiceBootstrapper();
var container = iocBootstrap.Build();
var services = container.Resolve<IEnumerable<ServiceBase>>();
ServiceBase.Run(
services.ToArray());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment