PersistentStateFactory.Create 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.
Overloads
Create<TState>(IGrainActivationContext, IPersistentStateConfiguration) | |
Create<TState>(IGrainContext, IPersistentStateConfiguration) |
Creates a persistent state instance for the provided grain. |
Create<TState>(IGrainActivationContext, IPersistentStateConfiguration)
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)
Type Parameters
- TState
Parameters
- context
- IGrainActivationContext
Returns
Implements
Applies to
Create<TState>(IGrainContext, IPersistentStateConfiguration)
Creates a persistent state instance for the provided grain.
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)
Type Parameters
- TState
The underlying state type.
Parameters
- context
- IGrainContext
The grain context.
Returns
A persistent state instance for the provided grain with the specified configuration.