Partilhar via


ICodeLensCallbackService.InvokeAsync Method

Definition

Overloads

InvokeAsync(IAsyncCodeLensDataPoint, String, IReadOnlyList<Object>, CancellationToken)

Invoke a callback method in the VS process using a JSON-RPC stream tied to the supplied dataPoint.

InvokeAsync(IAsyncCodeLensDataPointProvider, String, IReadOnlyList<Object>, CancellationToken)

Invoke a callback method in the VS process using a JSON-RPC stream tied to the supplied dataPointProvider.

InvokeAsync<TResult>(IAsyncCodeLensDataPoint, String, IReadOnlyList<Object>, CancellationToken)

Invoke a callback method in the VS process using a JSON-RPC stream tied to the supplied dataPoint and get back the result.

InvokeAsync<TResult>(IAsyncCodeLensDataPointProvider, String, IReadOnlyList<Object>, CancellationToken)

Invoke a callback method in the VS process using a JSON-RPC stream tied to the supplied dataPointProvider and get back the result.

InvokeAsync(IAsyncCodeLensDataPoint, String, IReadOnlyList<Object>, CancellationToken)

Invoke a callback method in the VS process using a JSON-RPC stream tied to the supplied dataPoint.

public System.Threading.Tasks.Task InvokeAsync (Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPoint dataPoint, string targetName, System.Collections.Generic.IReadOnlyList<object> arguments = default, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeAsync : Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPoint * string * System.Collections.Generic.IReadOnlyList<obj> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function InvokeAsync (dataPoint As IAsyncCodeLensDataPoint, targetName As String, Optional arguments As IReadOnlyList(Of Object) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

dataPoint
IAsyncCodeLensDataPoint

The IAsyncCodeLensDataPoint to which the callback method is tied.

targetName
String

Name of the callback method. Must not be null or empty string.

arguments
IReadOnlyList<Object>

Arguments that must be supplied to the callback method. Must be serializable to JSON.

cancellationToken
CancellationToken

A CancellationToken whose cancellation should terminate execution of the callback.

Returns

A task that completes when the callback method completes executing.

Remarks

The VS in-proc ICodeLensCallbackListener that has a method whose name or JsonRpcMethodAttribute which exactly matches the supplied targetName will receive the callback.

Applies to

InvokeAsync(IAsyncCodeLensDataPointProvider, String, IReadOnlyList<Object>, CancellationToken)

Invoke a callback method in the VS process using a JSON-RPC stream tied to the supplied dataPointProvider.

public System.Threading.Tasks.Task InvokeAsync (Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPointProvider dataPointProvider, string targetName, System.Collections.Generic.IReadOnlyList<object> arguments = default, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeAsync : Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPointProvider * string * System.Collections.Generic.IReadOnlyList<obj> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function InvokeAsync (dataPointProvider As IAsyncCodeLensDataPointProvider, targetName As String, Optional arguments As IReadOnlyList(Of Object) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

dataPointProvider
IAsyncCodeLensDataPointProvider

The IAsyncCodeLensDataPointProvider to which the callback method is tied.

targetName
String

Name of the callback method. Must not be null or empty string.

arguments
IReadOnlyList<Object>

Arguments that must be supplied to the callback method. Must be serializable to JSON.

cancellationToken
CancellationToken

A CancellationToken whose cancellation should terminate execution of the callback.

Returns

A task that completes when the callback method completes executing.

Remarks

The VS in-proc ICodeLensCallbackListener that has a method whose name or JsonRpcMethodAttribute which exactly matches the supplied targetName will receive the callback.

Applies to

InvokeAsync<TResult>(IAsyncCodeLensDataPoint, String, IReadOnlyList<Object>, CancellationToken)

Invoke a callback method in the VS process using a JSON-RPC stream tied to the supplied dataPoint and get back the result.

public System.Threading.Tasks.Task<TResult> InvokeAsync<TResult> (Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPoint dataPoint, string targetName, System.Collections.Generic.IReadOnlyList<object> arguments = default, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeAsync : Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPoint * string * System.Collections.Generic.IReadOnlyList<obj> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Result>
Public Function InvokeAsync(Of TResult) (dataPoint As IAsyncCodeLensDataPoint, targetName As String, Optional arguments As IReadOnlyList(Of Object) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TResult)

Type Parameters

TResult

Parameters

dataPoint
IAsyncCodeLensDataPoint

The IAsyncCodeLensDataPoint to which the callback method is tied.

targetName
String

Name of the callback method. Must not be null or empty string.

arguments
IReadOnlyList<Object>

Arguments that must be supplied to the callback method. Must be serializable to JSON.

cancellationToken
CancellationToken

A CancellationToken whose cancellation should terminate execution of the callback.

Returns

Task<TResult>

A task that completes when the callback method completes executing and that contains the result of the callback.

Remarks

The VS in-proc ICodeLensCallbackListener that has a method whose name or JsonRpcMethodAttribute which exactly matches the supplied targetName will receive the callback and can respond to the callback request with a result.

Applies to

InvokeAsync<TResult>(IAsyncCodeLensDataPointProvider, String, IReadOnlyList<Object>, CancellationToken)

Invoke a callback method in the VS process using a JSON-RPC stream tied to the supplied dataPointProvider and get back the result.

public System.Threading.Tasks.Task<TResult> InvokeAsync<TResult> (Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPointProvider dataPointProvider, string targetName, System.Collections.Generic.IReadOnlyList<object> arguments = default, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeAsync : Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPointProvider * string * System.Collections.Generic.IReadOnlyList<obj> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Result>
Public Function InvokeAsync(Of TResult) (dataPointProvider As IAsyncCodeLensDataPointProvider, targetName As String, Optional arguments As IReadOnlyList(Of Object) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TResult)

Type Parameters

TResult

Parameters

dataPointProvider
IAsyncCodeLensDataPointProvider

The IAsyncCodeLensDataPointProvider to which the callback method is tied.

targetName
String

Name of the callback method. Must not be null or empty string.

arguments
IReadOnlyList<Object>

Arguments that must be supplied to the callback method. Must be serializable to JSON.

cancellationToken
CancellationToken

A CancellationToken whose cancellation should terminate execution of the callback.

Returns

Task<TResult>

A task that completes when the callback method completes executing and that contains the result of the callback.

Remarks

The VS in-proc ICodeLensCallbackListener that has a method whose name or JsonRpcMethodAttribute which exactly matches the supplied targetName will receive the callback and can respond to the callback request with a result.

Applies to