共用方式為


SystemTarget.GetOrSetExtension<TExtension,TExtensionInterface> 方法

定義

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

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)
override this.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)

類型參數

TExtension

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

TExtensionInterface

實作的公用介面類別型。

參數

newExtensionFunc
Func<TExtension>

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

傳回

ValueTuple<TExtension,TExtensionInterface>

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

實作

適用於