Редагувати

Поділитися через


InstanceStore Class

Definition

Represents an instance store.

public ref class InstanceStore abstract
public abstract class InstanceStore
type InstanceStore = class
Public MustInherit Class InstanceStore
Inheritance
InstanceStore
Derived

Remarks

A persistence provider provides access to an instance store through a concrete implementation of the InstanceStore class.

Persistence providers may call InstanceHandle.Free on handles passed to TryCommand, even after the command has finished executing. But persistence providers must not hold strong references to InstanceHandle or InstanceOwner objects, as this can prevent InstanceStore from being garbage collected.

Warning

Workflow definitions for persisted workflows cannot be changed. If a workflow definition is changed after it is persisted, the workflow runtime will crash when the workflow is reloaded.

Constructors

InstanceStore()

Initializes an instance of the InstanceStore class.

Properties

DefaultInstanceOwner

Gets or sets the default instance owner.

Methods

BeginExecute(InstanceHandle, InstancePersistenceCommand, TimeSpan, AsyncCallback, Object)

Asynchronously executes persistence commands such as LoadWorkflowCommand and SaveWorkflowCommand.

BeginTryCommand(InstancePersistenceContext, InstancePersistenceCommand, TimeSpan, AsyncCallback, Object)

A persistence provider implements this method, which determines whether a particular persistence command can be executed. If the command can be executed, executes the command asynchronously.

BeginWaitForEvents(InstanceHandle, TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to listen for any events raised by the instance store for a specific instance handle.

CreateInstanceHandle()

Creates an instance handle.

CreateInstanceHandle(Guid)

Creates an instance handle. If the DefaultInstanceOwner is set, the value is automatically bound as the new handle's instance owner. The instance identifier passed as a parameter is automatically bound as the new handle's instance.

CreateInstanceHandle(InstanceOwner)

Creates an instance handle. If the instance owner passed as a parameter is not null, the value is automatically bound as the new handle's instance owner. (Otherwise, no instance owner is bound, even if DefaultInstanceOwner is set.)

CreateInstanceHandle(InstanceOwner, Guid)

Creates an instance handle. If the instance owner passed as a parameter is not null, the value is automatically bound as the new handle's instance owner. (Otherwise, no instance owner is bound, even if DefaultInstanceOwner is set.) The instance identifier passed as a parameter is automatically bound as the new handle's instance.

EndExecute(IAsyncResult)

Ends the asynchronous operation.

EndTryCommand(IAsyncResult)

Ends an asynchronous operation.

EndWaitForEvents(IAsyncResult)

Ends the asynchronous operation initiated by the BeginWaitForEvents(InstanceHandle, TimeSpan, AsyncCallback, Object) method.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Execute(InstanceHandle, InstancePersistenceCommand, TimeSpan)

Executes a persistence command synchronously. Examples of persistence commands are: LoadWorkflowCommand and SaveWorkflowCommand.

GetEvents(InstanceOwner)

Gets all the signaled events bound to an InstanceOwner object.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetInstanceOwners()

Gets each InstanceOwner object that is bound to a valid instance handle or has not been garbage collected.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
OnFreeInstanceHandle(InstanceHandle, Object)

Invoked when an instance handle is freed.

OnNewInstanceHandle(InstanceHandle)

Invoked when a new instance handle is created.

ResetEvent(InstancePersistenceEvent, InstanceOwner)

Resets the signaled event and removes the event from the signaled events list maintained by the instance owner.

SignalEvent(InstancePersistenceEvent, InstanceOwner)

An instance store invokes this method to signal an event. A workflow host that subscribes for this persistence event receives it and takes an appropriate action.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryCommand(InstancePersistenceContext, InstancePersistenceCommand, TimeSpan)

A persistence provider implements this method, which determines whether a particular persistence command can be executed and if the command can be executed executes it asynchronously.

WaitForEvents(InstanceHandle, TimeSpan)

A workflow host typically invokes this method to wait for an event to be signaled.

Applies to