public static int Main(string[] args) { try { var arguments = Args.InvokeAction<Arguments>(args).Args; IPackageSourceFileFactory packageSourceFileFactory = new PackageSourceFileFactory(); var packageSourceFile = packageSourceFileFactory.CreatePackageSourceFile(); var packageManager = new PackageManagerModule(packageSourceFile); var packageSource = string.IsNullOrWhiteSpace(arguments.Source) ? packageManager.ActiveSource : packageManager.GetSource(arguments.Source); var sourceFactory = new SourcePackageRepositoryFactory(packageSource); IPackageInstallerFactory factory = new PackageInstallerFactory( sourceFactory, new SystemConfigurationManager(), new PhysicalDirectorySystem()); var installer = factory.CreatePackageInstaller(arguments.Destination, arguments.Configuration); var program = new Console(arguments, installer); return program.Start(); } catch (Exception) { System.Console.WriteLine(ArgUsage.GetUsage<Arguments>()); return 1; } }
public void BeforeEach() { var packageSourceFile = new PackageSourceFileFactory().CreatePackageSourceFile(); var module = new PackageManagerModule(packageSourceFile); this.Setup(module.GetSource("TestLocalFeed")); }
public void BeforeEach() { var directoryName = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath); Debug.Assert(directoryName != null, "directoryName != null"); var configurationPath = Path.Combine(directoryName, "Configuration.json"); var packageSourceFile = new PackageSourceFileFactory().CreatePackageSourceFile(); var module = new PackageManagerModule(packageSourceFile); this.Setup(module.GetSource("TestLocalFeed"), ConfigurationExternalText, configurationPath); }
public void BeforeEach() { this.server = new PackagesWebServer(); this.server.Startup(); var packageSourceFile = new PackageSourceFileFactory().CreatePackageSourceFile(); var module = new PackageManagerModule(packageSourceFile); this.Setup(module.GetSource("TestRemoteFeed")); }
public void Setup() { var packageSourceFile = new PackageSourceFileFactory().CreatePackageSourceFile(); this.module = new PackageManagerModule(packageSourceFile); }