IVsService<T>.GetValueAsync(CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an instance of the T
service.
public System.Threading.Tasks.Task<T> GetValueAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetValueAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T : null)>
Public Function GetValueAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)
Parameters
- cancellationToken
- CancellationToken
A cancellation token.
Returns
An instance of the service.
Exceptions
Thrown when the service is not available. This may be because the service is not registered or because of a fault in the service factory. An InnerException may include details about an activation failure.
Throw when cancellationToken
is canceled before the request can be satisfied.
Remarks
Repeat calls to this method will return the same instance.