private void UpdateCache(INupkgProvider nupkgProvider, DeletePackageCompletedEventArgs eventArgs) { lock (CachedNuspec) { var versionDic = CachedNuspec.GetOrAdd(eventArgs.Id , id => new ConcurrentDictionary <string, Nuspec>()); versionDic.TryRemove(eventArgs.Version, out var removed); } }
internal async Task <bool> InvokeDeletePackageCompletedAsync( object sender, DeletePackageCompletedEventArgs eventArgs) { if (DeletePackageCompleted == null) { return(false); } try { await Task.Run(() => DeletePackageCompleted( sender, eventArgs )); } catch { } return(true); }
public void OnDeletePackageCompleted(object sender, DeletePackageCompletedEventArgs eventArgs) => UpdateCache(sender as INupkgProvider, eventArgs);
public void OnDeletePackageCompleted(object sender, DeletePackageCompletedEventArgs eventArgs) { }