示例#1
0
            private async Task NominateProjectRestoreAsync(IVsProjectRestoreInfo2 restoreInfo, CancellationToken cancellationToken)
            {
                RestoreLogger.BeginNominateRestore(_logger, _project.FullPath, restoreInfo);

                // Nominate NuGet with the restore data. This will complete when we're guaranteed
                // that the  assets files *at least* contains the changes that we pushed to it.
                await _solutionRestoreService.NominateProjectAsync(_project.FullPath, restoreInfo, cancellationToken);

                CodeMarkers.Instance.CodeMarker(CodeMarkerTimerId.PerfPackageRestoreEnd);

                RestoreLogger.EndNominateRestore(_logger, _project.FullPath);
            }
        private async Task <bool> NominateForRestoreAsync(ProjectRestoreInfo restoreInfo, CancellationToken cancellationToken)
        {
            RestoreLogger.BeginNominateRestore(_logger, _project.FullPath, restoreInfo);

            try
            {
                return(await _solutionRestoreService.NominateProjectAsync(_project.FullPath, restoreInfo, cancellationToken));
            }
            finally
            {
                CodeMarkers.Instance.CodeMarker(CodeMarkerTimerId.PerfPackageRestoreEnd);

                RestoreLogger.EndNominateRestore(_logger, _project.FullPath);
            }
        }