예제 #1
0
 /// <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();
     }
 }
예제 #2
0
        /// <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();
        }
예제 #3
0
 internal ApplicationLock(Guid id, Downloader.Models.IDisplayable source)
     : base(source)
 {
     Id        = id;
     CreatedAt = DateTime.Now;
 }
예제 #4
0
 internal ApplicationInfo(Downloader.Models.IDisplayable source)
     : base(source)
 {
 }