예제 #1
0
        private async Task <bool> TryUpdatePackageAsync(string id, NuGetVersion version, Action <Package> action)
        {
            var package = await _context.FindPackage(id, version);

            if (package != null)
            {
                action(package);
                return(await _context.UpdatePackage(package));
            }

            return(false);
        }