共用方式為


PersistentStateFactory.Create 方法

定義

多載

Create<TState>(IGrainActivationContext, IPersistentStateConfiguration)
Create<TState>(IGrainContext, IPersistentStateConfiguration)

為提供的細微性建立持續性狀態實例。

Create<TState>(IGrainActivationContext, IPersistentStateConfiguration)

來源:
PersistentStateStorageFactory.cs
public Orleans.Runtime.IPersistentState<TState> Create<TState> (Orleans.Runtime.IGrainActivationContext context, Orleans.Runtime.IPersistentStateConfiguration cfg) where TState : new();
public Orleans.Runtime.IPersistentState<TState> Create<TState> (Orleans.Runtime.IGrainActivationContext context, Orleans.Runtime.IPersistentStateConfiguration cfg);
abstract member Create : Orleans.Runtime.IGrainActivationContext * Orleans.Runtime.IPersistentStateConfiguration -> Orleans.Runtime.IPersistentState<'State (requires 'State : (new : unit -> 'State))> (requires 'State : (new : unit -> 'State))
override this.Create : Orleans.Runtime.IGrainActivationContext * Orleans.Runtime.IPersistentStateConfiguration -> Orleans.Runtime.IPersistentState<'State (requires 'State : (new : unit -> 'State))> (requires 'State : (new : unit -> 'State))
abstract member Create : Orleans.Runtime.IGrainActivationContext * Orleans.Runtime.IPersistentStateConfiguration -> Orleans.Runtime.IPersistentState<'State>
override this.Create : Orleans.Runtime.IGrainActivationContext * Orleans.Runtime.IPersistentStateConfiguration -> Orleans.Runtime.IPersistentState<'State>
Public Function Create(Of TState As New) (context As IGrainActivationContext, cfg As IPersistentStateConfiguration) As IPersistentState(Of TState)
Public Function Create(Of TState) (context As IGrainActivationContext, cfg As IPersistentStateConfiguration) As IPersistentState(Of TState)

類型參數

TState

參數

傳回

實作

適用於

Create<TState>(IGrainContext, IPersistentStateConfiguration)

為提供的細微性建立持續性狀態實例。

public Orleans.Runtime.IPersistentState<TState> Create<TState> (Orleans.Runtime.IGrainContext context, Orleans.Runtime.IPersistentStateConfiguration cfg);
abstract member Create : Orleans.Runtime.IGrainContext * Orleans.Runtime.IPersistentStateConfiguration -> Orleans.Runtime.IPersistentState<'State>
override this.Create : Orleans.Runtime.IGrainContext * Orleans.Runtime.IPersistentStateConfiguration -> Orleans.Runtime.IPersistentState<'State>
Public Function Create(Of TState) (context As IGrainContext, cfg As IPersistentStateConfiguration) As IPersistentState(Of TState)

類型參數

TState

基礎狀態類型。

參數

context
IGrainContext

細微性內容。

傳回

所提供細微性的持續性狀態實例,具有指定的組態。

實作

適用於