/// <summary> /// /// </summary> /// <param name="info"></param> /// <returns></returns> internal async Task DeleteAsync(Downloader.Models.IDisplayable info) { if (Applications.TryRemove(info.Name, out var _)) { await WriteAsync(); } }
/// <summary> /// /// </summary> /// <returns></returns> internal async Task LockAsync(Identity id, Downloader.Models.IDisplayable info, InstallationState state) { Applications.AddOrUpdate(info.Name, (_) => new ApplicationLock(id.Number, info) { InstallationState = state }, (_, item) => { item.InstallationState = state; return(item); }); await WriteAsync(); }
internal ApplicationLock(Guid id, Downloader.Models.IDisplayable source) : base(source) { Id = id; CreatedAt = DateTime.Now; }
internal ApplicationInfo(Downloader.Models.IDisplayable source) : base(source) { }