ICodeContainerProvider.AcquireCodeContainerAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| AcquireCodeContainerAsync(IProgress<ServiceProgressData>, CancellationToken) |
在本地获取联机代码容器 |
| AcquireCodeContainerAsync(CodeContainer, IProgress<ServiceProgressData>, CancellationToken) |
在本地获取以前已知的联机代码容器。 以前已知的代码容器的示例适用于给定的已登录用户、在一个设备上获取并可用作第二个设备上的联机代码容器并且可用于获取的代码容器 |
AcquireCodeContainerAsync(IProgress<ServiceProgressData>, CancellationToken)
在本地获取联机代码容器
public:
System::Threading::Tasks::Task<Microsoft::VisualStudio::Shell::CodeContainer ^> ^ AcquireCodeContainerAsync(IProgress<Microsoft::VisualStudio::Shell::ServiceProgressData ^> ^ downloadProgress, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.CodeContainer> AcquireCodeContainerAsync (IProgress<Microsoft.VisualStudio.Shell.ServiceProgressData> downloadProgress, System.Threading.CancellationToken cancellationToken);
abstract member AcquireCodeContainerAsync : IProgress<Microsoft.VisualStudio.Shell.ServiceProgressData> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.CodeContainer>
Public Function AcquireCodeContainerAsync (downloadProgress As IProgress(Of ServiceProgressData), cancellationToken As CancellationToken) As Task(Of CodeContainer)
参数
- downloadProgress
- IProgress<ServiceProgressData>
报告下载进度。 如果此值为 null,则不会报告任何下载进度。
- cancellationToken
- CancellationToken
取消操作的取消标记
返回
任务会返回在本地获取的代码容器。 如果任务出错,则会在 VS 活动日志中记录异常
适用于
AcquireCodeContainerAsync(CodeContainer, IProgress<ServiceProgressData>, CancellationToken)
在本地获取以前已知的联机代码容器。
以前已知的代码容器的示例适用于给定的已登录用户、在一个设备上获取并可用作第二个设备上的联机代码容器并且可用于获取的代码容器
public:
System::Threading::Tasks::Task<Microsoft::VisualStudio::Shell::CodeContainer ^> ^ AcquireCodeContainerAsync(Microsoft::VisualStudio::Shell::CodeContainer ^ onlineCodeContainer, IProgress<Microsoft::VisualStudio::Shell::ServiceProgressData ^> ^ downloadProgress, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.CodeContainer> AcquireCodeContainerAsync (Microsoft.VisualStudio.Shell.CodeContainer onlineCodeContainer, IProgress<Microsoft.VisualStudio.Shell.ServiceProgressData> downloadProgress, System.Threading.CancellationToken cancellationToken);
abstract member AcquireCodeContainerAsync : Microsoft.VisualStudio.Shell.CodeContainer * IProgress<Microsoft.VisualStudio.Shell.ServiceProgressData> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.CodeContainer>
Public Function AcquireCodeContainerAsync (onlineCodeContainer As CodeContainer, downloadProgress As IProgress(Of ServiceProgressData), cancellationToken As CancellationToken) As Task(Of CodeContainer)
参数
- onlineCodeContainer
- CodeContainer
要获取的联机代码容器
- downloadProgress
- IProgress<ServiceProgressData>
报告下载进度。 如果此值为 null,则不会报告任何下载进度。
- cancellationToken
- CancellationToken
取消操作的取消标记
返回
任务会返回在本地获取的代码容器。 如果任务出错,则会在 VS 活动日志中记录异常