Partilhar via


IVsClientTargetsService.CreateDescriptorAsync Method

Definition

Overloads

CreateDescriptorAsync(ServiceJsonRpcDescriptor, ClientFeatures, CancellationToken)

Creates a service descriptor that automatically adds the callback targets for the specified features when querying for a service.

CreateDescriptorAsync(ServiceMoniker, ClientFeatures, Type, CancellationToken)

Creates a service descriptor that automatically adds the callback targets for the specified features when querying for a service. The user specified callback target in ServiceActivationOptions will also be added after the client feature ones.

CreateDescriptorAsync(ServiceJsonRpcDescriptor, ClientFeatures, CancellationToken)

Creates a service descriptor that automatically adds the callback targets for the specified features when querying for a service.

public System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.ServiceRpcDescriptor> CreateDescriptorAsync (Microsoft.ServiceHub.Framework.ServiceJsonRpcDescriptor descriptor, Microsoft.VisualStudio.Shell.Internal.ClientFeatures features, System.Threading.CancellationToken cancellationToken);
abstract member CreateDescriptorAsync : Microsoft.ServiceHub.Framework.ServiceJsonRpcDescriptor * Microsoft.VisualStudio.Shell.Internal.ClientFeatures * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.ServiceRpcDescriptor>
Public Function CreateDescriptorAsync (descriptor As ServiceJsonRpcDescriptor, features As ClientFeatures, cancellationToken As CancellationToken) As Task(Of ServiceRpcDescriptor)

Parameters

descriptor
ServiceJsonRpcDescriptor

Descriptor that the new descriptor should be based on.

features
ClientFeatures

Features to be enabled in the callback target.

cancellationToken
CancellationToken

Cancellation token to monitor.

Returns

a ServiceRpcDescriptor instance that can be used to query for a service through IServiceBroker.

Applies to

CreateDescriptorAsync(ServiceMoniker, ClientFeatures, Type, CancellationToken)

Creates a service descriptor that automatically adds the callback targets for the specified features when querying for a service. The user specified callback target in ServiceActivationOptions will also be added after the client feature ones.

public:
 System::Threading::Tasks::Task<Microsoft::ServiceHub::Framework::ServiceRpcDescriptor ^> ^ CreateDescriptorAsync(Microsoft::ServiceHub::Framework::ServiceMoniker ^ moniker, Microsoft::VisualStudio::Shell::Internal::ClientFeatures features, Type ^ clientInterface, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.ServiceRpcDescriptor> CreateDescriptorAsync (Microsoft.ServiceHub.Framework.ServiceMoniker moniker, Microsoft.VisualStudio.Shell.Internal.ClientFeatures features, Type? clientInterface, System.Threading.CancellationToken cancellationToken);
abstract member CreateDescriptorAsync : Microsoft.ServiceHub.Framework.ServiceMoniker * Microsoft.VisualStudio.Shell.Internal.ClientFeatures * Type * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.ServiceRpcDescriptor>
Public Function CreateDescriptorAsync (moniker As ServiceMoniker, features As ClientFeatures, clientInterface As Type, cancellationToken As CancellationToken) As Task(Of ServiceRpcDescriptor)

Parameters

moniker
ServiceMoniker

Service moniker that descriptor is intended for.

features
ClientFeatures

Features to be enabled in the callback target.

clientInterface
Type

Type for the client callback interface if there is any, null otherwise.

cancellationToken
CancellationToken

Cancellation token to monitor.

Returns

a ServiceRpcDescriptor instance that can be used to query for a service through IServiceBroker.

Remarks

The descriptor returned will be using UTF8 formatter and expects the requested service to be defined as such as well.

Applies to