共用方式為


IProviderRuntime.BindExtension<TExtension,TExtensionInterface> 方法

定義

如果尚未完成,請將延伸模組系結至可定址的物件。

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)

類型參數

TExtension

延伸模組的類型 (例如 StreamConsumerExtension) 。

TExtensionInterface

實作的公用介面類別型。

參數

newExtensionFunc
Func<TExtension>

建構新擴充物件的 Factory 函式。

傳回

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

元組,包含延伸模組的第一個,第二個可定址參考延伸模組的介面。

適用於