public void Start() { //sets bottles to look for things in '~/packages' BottleFiles.PackagesFolder = "packages"; var manifest = _fileSystem.LoadFromFile<ServicePackageManifest>("svc", ServicePackageManifest.FILE); var type = Type.GetType(manifest.Bootstrapper, true, true); //guard clauses here _svc = (IBottleAwareService) Activator.CreateInstance(type); //this is done so that start can return, as 'LoadPackages' may take some time. ThreadPool.QueueUserWorkItem(cb => { int shutUpResharper = 0; PackageRegistry.LoadPackages(pkg => { pkg.Loader(new BottleHostLoader(_fileSystem, _exploder)); pkg.Bootstrapper(_svc); }); }); }
public void Start() { //sets bottles to look for things in '~/packages' BottleFiles.PackagesFolder = "packages"; var manifest = _fileSystem.LoadFromFile <HostManifest>("svc", HostManifest.FILE); var type = Type.GetType(manifest.Bootstrapper, true, true); //guard clauses here _svc = (IBottleAwareService)Activator.CreateInstance(type); //this is done so that start can return, as 'LoadPackages' may take some time. ThreadPool.QueueUserWorkItem(cb => { int shutUpResharper = 0; PackageRegistry.LoadPackages(pkg => { pkg.Loader(new BottleHostLoader(_fileSystem, _exploder)); pkg.Bootstrapper(_svc); }); }); }
public void Start() { var manifest = LoadFromFile(ServiceInfo.FILE); var type = Type.GetType(manifest.Bootstrapper, true, true); //guard clauses here _svc = (IBottleAwareService) Activator.CreateInstance(type); //this is done so that start can return, as 'LoadPackages' may take some time. ThreadPool.QueueUserWorkItem(cb => { PackageRegistry.LoadPackages(pkg => { pkg.Loader(new TopshelfPackageLoader(_exploder)); pkg.Bootstrapper(_svc); }); }); }