public static CreateStorageFactory ( string>.IDictionary |
||
arguments | string>.IDictionary | |
verbose | bool | |
Результат | NuGet.Services.Metadata.Catalog.Persistence.StorageFactory |
public static StorageFactory CreateStorageFactory(IDictionary<string, string> arguments, bool verbose)
{
IDictionary<string, string> names = new Dictionary<string, string>
{
{ Arguments.StorageBaseAddress, Arguments.StorageBaseAddress },
{ Arguments.StorageAccountName, Arguments.StorageAccountName },
{ Arguments.StorageKeyValue, Arguments.StorageKeyValue },
{ Arguments.StorageContainer, Arguments.StorageContainer },
{ Arguments.StoragePath, Arguments.StoragePath }
};
return CreateStorageFactoryImpl(arguments, names, verbose);
}
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(); }