async Task CreateRegistrationBlobs(Uri catalogIndex, Func <StorageHttpMessageHandler> handlerFunc, CancellationToken cancellationToken) { var factory = new MemoryStorageFactory(new Uri(_baseAddress, Registration), _store); CommitCollector collector = new RegistrationCollector(catalogIndex, factory, handlerFunc) { ContentBaseAddress = new Uri("http://tempuri.org/content/"), UnlistShouldDelete = false }; await collector.Run( new MemoryCursor(DateTime.MinValue.ToUniversalTime()), new MemoryCursor(DateTime.MaxValue.ToUniversalTime()), cancellationToken); }
public static async Task Test4Async() { Uri catalogUri = new Uri("https://nugetdevstorage.blob.core.windows.net/catalog/index.json"); string path = "c:\\data\\registration20150417"; DirectoryInfo directoryInfo = new DirectoryInfo(path); if (directoryInfo.Exists) { directoryInfo.Delete(true); } directoryInfo.Create(); FileStorageFactory factory = new FileStorageFactory(new Uri("http://tempuri.org"), path); CollectorBase collector = new RegistrationCollector(catalogUri, factory); await collector.Run(); }