IPersistentStateFactory.Create 方法

定义

重载

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

为提供的粒度创建永久性状态实例。

Create<TState>(IGrainActivationContext, IPersistentStateConfiguration)

Source:
IPersistentStateFactory.cs
public Orleans.Runtime.IPersistentState<TState> Create<TState> (Orleans.Runtime.IGrainActivationContext context, Orleans.Runtime.IPersistentStateConfiguration config) where TState : new();
public Orleans.Runtime.IPersistentState<TState> Create<TState> (Orleans.Runtime.IGrainActivationContext context, Orleans.Runtime.IPersistentStateConfiguration config);
abstract member 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>
Public Function Create(Of TState As New) (context As IGrainActivationContext, config As IPersistentStateConfiguration) As IPersistentState(Of TState)
Public Function Create(Of TState) (context As IGrainActivationContext, config 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 config);
abstract member Create : Orleans.Runtime.IGrainContext * Orleans.Runtime.IPersistentStateConfiguration -> Orleans.Runtime.IPersistentState<'State>
Public Function Create(Of TState) (context As IGrainContext, config As IPersistentStateConfiguration) As IPersistentState(Of TState)

类型参数

TState

基础状态类型。

参数

context
IGrainContext

grain 上下文。

config
IPersistentStateConfiguration

状态方面配置。

返回

具有指定配置的提供的 grain 的持久状态实例。

适用于