Compartir a través de


IProviderRuntime.BindExtension<TExtension,TExtensionInterface> Método

Definición

Enlaza una extensión a un objeto direccionable, si aún no lo ha hecho.

public System.Threading.Tasks.Task<Tuple<TExtension,TExtensionInterface>> BindExtension<TExtension,TExtensionInterface> (Func<TExtension> newExtensionFunc) where TExtension : Orleans.Runtime.IGrainExtension where TExtensionInterface : Orleans.Runtime.IGrainExtension;
public (TExtension Extension, TExtensionInterface ExtensionReference) BindExtension<TExtension,TExtensionInterface> (Func<TExtension> newExtensionFunc) where TExtension : class, TExtensionInterface where TExtensionInterface : class, Orleans.Runtime.IGrainExtension;
abstract member BindExtension : Func<'Extension (requires 'Extension :> Orleans.Runtime.IGrainExtension)> -> System.Threading.Tasks.Task<'Extension * 'ExtensionInterface> (requires 'Extension :> Orleans.Runtime.IGrainExtension and 'ExtensionInterface :> Orleans.Runtime.IGrainExtension)
abstract member BindExtension : Func<#'ExtensionInterface> -> ValueTuple<#'ExtensionInterface, 'ExtensionInterface (requires 'ExtensionInterface : null and 'ExtensionInterface :> Orleans.Runtime.IGrainExtension)> (requires 'ExtensionInterface : null and 'ExtensionInterface :> Orleans.Runtime.IGrainExtension)
Public Function BindExtension(Of TExtension As IGrainExtension, TExtensionInterface As IGrainExtension) (newExtensionFunc As Func(Of TExtension)) As Task(Of Tuple(Of TExtension, TExtensionInterface))
Public Function BindExtension(Of TExtension As {Class, TExtensionInterface}, TExtensionInterface As {Class, TExtensionInterface}) (newExtensionFunc As Func(Of TExtension)) As ValueTuple(Of TExtension, TExtensionInterface)

Parámetros de tipo

TExtension

Tipo de la extensión (por ejemplo, StreamConsumerExtension).

TExtensionInterface

Tipo de interfaz pública de la implementación.

Parámetros

newExtensionFunc
Func<TExtension>

Función de fábrica que construye un nuevo objeto de extensión.

Devoluciones

Task<Tuple<TExtension,TExtensionInterface>>
ValueTuple<TExtension,TExtensionInterface>

Una tupla, que contiene primero la extensión y la segunda referencia direccionable a la interfaz de la extensión.

Se aplica a