Compartilhar via


IProviderRuntime.BindExtension<TExtension,TExtensionInterface> Método

Definição

Associa uma extensão a um objeto endereçável, se ainda não tiver sido feito.

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

O tipo da extensão (por exemplo, StreamConsumerExtension).

TExtensionInterface

O tipo de interface pública da implementação.

Parâmetros

newExtensionFunc
Func<TExtension>

Uma função de fábrica que constrói um novo objeto de extensão.

Retornos

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

Uma tupla, que contém primeiro a extensão e, em segundo lugar, uma referência endereçável à interface da extensão.

Aplica-se a