Edytuj

Udostępnij za pośrednictwem


IProviderRuntime.BindExtension<TExtension,TExtensionInterface> Method

Definition

Binds an extension to an addressable object, if not already done.

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)

Type Parameters

TExtension

The type of the extension (e.g. StreamConsumerExtension).

TExtensionInterface

The public interface type of the implementation.

Parameters

newExtensionFunc
Func<TExtension>

A factory function that constructs a new extension object.

Returns

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

A tuple, containing first the extension and second an addressable reference to the extension's interface.

Applies to