public static CreateStorageFactory ( string>.IDictionary |
||
arguments | string>.IDictionary | |
verbose | bool | |
리턴 | NuGet.Services.Metadata.Catalog.Persistence.StorageFactory |
public static void Run(string[] args) { IDictionary <string, string> arguments = CommandHelpers.GetArguments(args, 1); if (arguments == null || arguments.Count == 0) { PrintUsage(); return; } string gallery = CommandHelpers.GetGallery(arguments); if (gallery == null) { PrintUsage(); return; } bool verbose = CommandHelpers.GetVerbose(arguments); int interval = CommandHelpers.GetInterval(arguments); DateTime startDate = CommandHelpers.GetStartDate(arguments); StorageFactory storageFactory = CommandHelpers.CreateStorageFactory(arguments, verbose); if (storageFactory == null) { PrintUsage(); return; } if (verbose) { Trace.Listeners.Add(new ConsoleTraceListener()); Trace.AutoFlush = true; } Trace.TraceInformation("CONFIG source: \"{0}\" storage: \"{1}\" interval: {2}", gallery, storageFactory, interval); DateTime?nullableStartDate = null; if (startDate != DateTime.MinValue) { nullableStartDate = startDate; } Loop(gallery, storageFactory, verbose, interval, nullableStartDate).Wait(); }
public static void Package(string[] args) { IDictionary <string, string> arguments = CommandHelpers.GetArguments(args, 1); if (arguments == null || arguments.Count == 0) { PackagePrintUsage(); return; } string gallery = CommandHelpers.GetGallery(arguments); if (gallery == null) { PackagePrintUsage(); return; } bool verbose = CommandHelpers.GetVerbose(arguments); string id = CommandHelpers.GetId(arguments); if (id == null) { PackagePrintUsage(); return; } string version = CommandHelpers.GetVersion(arguments); StorageFactory storageFactory = CommandHelpers.CreateStorageFactory(arguments, verbose); if (storageFactory == null) { PrintUsage(); return; } if (verbose) { Trace.Listeners.Add(new ConsoleTraceListener()); Trace.AutoFlush = true; } ProcessPackages(gallery, storageFactory, id, version, verbose).Wait(); }
public static void Run(string[] args) { IDictionary <string, string> arguments = CommandHelpers.GetArguments(args, 1); if (arguments == null || arguments.Count == 0) { PrintUsage(); return; } string source = CommandHelpers.GetSource(arguments); if (source == null) { PrintUsage(); return; } bool verbose = CommandHelpers.GetVerbose(arguments); int interval = CommandHelpers.GetInterval(arguments); string contentBaseAddress = CommandHelpers.GetContentBaseAddress(arguments); StorageFactory storageFactory = CommandHelpers.CreateStorageFactory(arguments, verbose); if (storageFactory == null) { PrintUsage(); return; } if (verbose) { Trace.Listeners.Add(new ConsoleTraceListener()); Trace.AutoFlush = true; } Trace.TraceInformation("CONFIG source: \"{0}\" storage: \"{1}\" interval: {2} seconds", source, storageFactory, interval); Loop(source, storageFactory, contentBaseAddress, verbose, interval).Wait(); }