Partager via


IHookableServiceJsonRpcDescriptor.WithCreateJsonRpcHook Méthode

Définition

Clone le descripteur avec un hook qui sera appelé lorsqu’un CreateJsonRpc(IJsonRpcMessageHandler) est appelé.

public Microsoft.ServiceHub.Framework.ServiceJsonRpcDescriptor WithCreateJsonRpcHook(Microsoft.VisualStudio.RpcContracts.IHookableServiceJsonRpcDescriptor.CreateJsonRpcDelegate? createJsonRpcDelegate);
abstract member WithCreateJsonRpcHook : Microsoft.VisualStudio.RpcContracts.IHookableServiceJsonRpcDescriptor.CreateJsonRpcDelegate -> Microsoft.ServiceHub.Framework.ServiceJsonRpcDescriptor
Public Function WithCreateJsonRpcHook (createJsonRpcDelegate As IHookableServiceJsonRpcDescriptor.CreateJsonRpcDelegate) As ServiceJsonRpcDescriptor

Paramètres

createJsonRpcDelegate
IHookableServiceJsonRpcDescriptor.CreateJsonRpcDelegate

Méthode à utiliser ou null.

Retours

cloné ServiceJsonRpcDescriptor avec le hook inscrit.

Remarques

Si le délégué retourne null, le descripteur utilise sa méthode par défaut.

S’applique à