IGrainExtensionBinder.GetOrSetExtension<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 (TExtension, TExtensionInterface) GetOrSetExtension<TExtension,TExtensionInterface> (Func<TExtension> newExtensionFunc) where TExtension : class, TExtensionInterface where TExtensionInterface : class, Orleans.Runtime.IGrainExtension;
abstract member GetOrSetExtension : Func<#'ExtensionInterface> -> ValueTuple<#'ExtensionInterface, 'ExtensionInterface (requires 'ExtensionInterface : null and 'ExtensionInterface :> Orleans.Runtime.IGrainExtension)> (requires 'ExtensionInterface : null and 'ExtensionInterface :> Orleans.Runtime.IGrainExtension)
Public Function GetOrSetExtension(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.