IProviderRuntime.BindExtension<TExtension,TExtensionInterface> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
ValueTuple<TExtension,TExtensionInterface>
A tuple, containing first the extension and second an addressable reference to the extension's interface.