Skip to content

Instantly share code, notes, and snippets.

@mikeobrien
Created May 5, 2010 01:12
Show Gist options
  • Save mikeobrien/390247 to your computer and use it in GitHub Desktop.
Save mikeobrien/390247 to your computer and use it in GitHub Desktop.
internal class ServiceControllerFactory : IServiceControllerFactory
{
public IServiceController CreateController()
{
if (Process.GetCurrentProcess().GetParent().ProcessName == "services")
return new ScmServiceController();
return new AsynchronousServiceController();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment