public RegistrationPersistence(StorageFactory storageFactory, RegistrationKey registrationKey, int partitionSize, int packageCountThreshold) { _storage = new RecordingStorage(storageFactory.Create(registrationKey.ToString())); _registrationUri = _storage.ResolveUri("index.json"); _packageCountThreshold = packageCountThreshold; _partitionSize = partitionSize; _registrationBaseAddress = storageFactory.BaseAddress; }
public RegistrationPersistence(StorageFactory storageFactory, RegistrationKey registrationKey, int partitionSize, int packageCountThreshold, Uri contentBaseAddress) { _storage = new RecordingStorage(storageFactory.Create(registrationKey.ToString())); _registrationUri = _storage.ResolveUri("index.json"); _packageCountThreshold = packageCountThreshold; _partitionSize = partitionSize; _registrationBaseAddress = storageFactory.BaseAddress; _contentBaseAddress = contentBaseAddress; }
static async Task Cleanup(RecordingStorage storage) { IList <Task> tasks = new List <Task>(); foreach (Uri loaded in storage.Loaded) { if (!storage.Saved.Contains(loaded)) { tasks.Add(storage.Delete(loaded)); } } if (tasks.Count > 0) { await Task.WhenAll(tasks.ToArray()); } }
private static async Task Cleanup(RecordingStorage storage, CancellationToken cancellationToken) { Trace.TraceInformation("RegistrationPersistence.Cleanup"); IList <Task> tasks = new List <Task>(); foreach (Uri loaded in storage.Loaded) { if (!storage.Saved.Contains(loaded)) { tasks.Add(storage.DeleteAsync(loaded, cancellationToken)); } } if (tasks.Count > 0) { await Task.WhenAll(tasks.ToArray()); } }
public RegistrationPersistence( StorageFactory storageFactory, RegistrationMakerCatalogItem.PostProcessGraph postProcessGraph, RegistrationKey registrationKey, int partitionSize, int packageCountThreshold, Uri contentBaseAddress, Uri galleryBaseAddress, bool forcePackagePathProviderForIcons) { _storage = new RecordingStorage(storageFactory.Create(registrationKey.ToString())); _postProcessGraph = postProcessGraph; _registrationUri = _storage.ResolveUri("index.json"); _packageCountThreshold = packageCountThreshold; _partitionSize = partitionSize; _registrationBaseAddress = storageFactory.BaseAddress; _contentBaseAddress = contentBaseAddress; _galleryBaseAddress = galleryBaseAddress; _forcePackagePathProviderForIcons = forcePackagePathProviderForIcons; }
static async Task Cleanup(RecordingStorage storage, CancellationToken cancellationToken) { Trace.TraceInformation("RegistrationPersistence.Cleanup"); IList<Task> tasks = new List<Task>(); foreach (Uri loaded in storage.Loaded) { if (!storage.Saved.Contains(loaded)) { tasks.Add(storage.Delete(loaded, cancellationToken)); } } if (tasks.Count > 0) { await Task.WhenAll(tasks.ToArray()); } }