Partilhar via


ICodeLensCallbackService.GetCallbackJsonRpc Method

Definition

Overloads

GetCallbackJsonRpc(IAsyncCodeLensDataPoint)
Obsolete.

Gets a JsonRpc on which the dataPoint can originate a callback to VS process.

GetCallbackJsonRpc(IAsyncCodeLensDataPointProvider)
Obsolete.

Gets a JsonRpc on which the dataPointProvider can originate a callback to VS process.

GetCallbackJsonRpc(IAsyncCodeLensDataPoint)

Caution

Use one of the InvokeAsync overloads instead

Gets a JsonRpc on which the dataPoint can originate a callback to VS process.

public:
 StreamJsonRpc::JsonRpc ^ GetCallbackJsonRpc(Microsoft::VisualStudio::Language::CodeLens::Remoting::IAsyncCodeLensDataPoint ^ dataPoint);
public StreamJsonRpc.JsonRpc GetCallbackJsonRpc (Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPoint dataPoint);
[System.Obsolete("Use one of the InvokeAsync overloads instead")]
public StreamJsonRpc.JsonRpc GetCallbackJsonRpc (Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPoint dataPoint);
abstract member GetCallbackJsonRpc : Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPoint -> StreamJsonRpc.JsonRpc
[<System.Obsolete("Use one of the InvokeAsync overloads instead")>]
abstract member GetCallbackJsonRpc : Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPoint -> StreamJsonRpc.JsonRpc
Public Function GetCallbackJsonRpc (dataPoint As IAsyncCodeLensDataPoint) As JsonRpc

Parameters

dataPoint
IAsyncCodeLensDataPoint

The IAsyncCodeLensDataPoint which the JsonRpc is associated with.

Returns

The JsonRpc that can be used to call back to VS process.

Attributes

Examples

See ICodeLensCallbackListener for a callback example.

Remarks

CodeLens extensions can use the JsonRpc returned from this method to invoke a callback to VS process using one of the JsonRpc.InvokeAsync overloads. The VS in-proc ICodeLensCallbackListener that has a method whose name or JsonRpcMethodAttribute exactly matches the target name passed to the callback invocation will receive the callback and can respond to the callback request with a result.

Refer to JsonRpcMethodAttribute and JsonRpc.InvokeAsync for more detail.

Applies to

GetCallbackJsonRpc(IAsyncCodeLensDataPointProvider)

Caution

Use one of the InvokeAsync overloads instead

Gets a JsonRpc on which the dataPointProvider can originate a callback to VS process.

public:
 StreamJsonRpc::JsonRpc ^ GetCallbackJsonRpc(Microsoft::VisualStudio::Language::CodeLens::Remoting::IAsyncCodeLensDataPointProvider ^ dataPointProvider);
public StreamJsonRpc.JsonRpc GetCallbackJsonRpc (Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPointProvider dataPointProvider);
[System.Obsolete("Use one of the InvokeAsync overloads instead")]
public StreamJsonRpc.JsonRpc GetCallbackJsonRpc (Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPointProvider dataPointProvider);
abstract member GetCallbackJsonRpc : Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPointProvider -> StreamJsonRpc.JsonRpc
[<System.Obsolete("Use one of the InvokeAsync overloads instead")>]
abstract member GetCallbackJsonRpc : Microsoft.VisualStudio.Language.CodeLens.Remoting.IAsyncCodeLensDataPointProvider -> StreamJsonRpc.JsonRpc
Public Function GetCallbackJsonRpc (dataPointProvider As IAsyncCodeLensDataPointProvider) As JsonRpc

Parameters

dataPointProvider
IAsyncCodeLensDataPointProvider

The IAsyncCodeLensDataPointProvider which the JsonRpc is associated with.

Returns

The JsonRpc that can be used to call back to VS process.

Attributes

Examples

See ICodeLensCallbackListener for a callback example.

Remarks

CodeLens extensions can use the JsonRpc returned from this method to invoke a callback to VS process using one of the JsonRpc.InvokeAsync overloads. The VS in-proc ICodeLensCallbackListener that has a method whose name or JsonRpcMethodAttribute exactly matches the target name passed to the callback invocation will receive the callback and can respond to the callback request with a result.

Refer to JsonRpcMethodAttribute and JsonRpc.InvokeAsync for more detail.

Applies to