Bearbeiten

Freigeben über


PersistenceIOParticipant Class

Definition

A derived vclass of the PersistenceParticipant class with methods that perform input and output operations in addition to the persisting and loading of workflow instances through the persistence process.

public ref class PersistenceIOParticipant abstract : System::Activities::Persistence::PersistenceParticipant
public abstract class PersistenceIOParticipant : System.Activities.Persistence.PersistenceParticipant
type PersistenceIOParticipant = class
    inherit PersistenceParticipant
Public MustInherit Class PersistenceIOParticipant
Inherits PersistenceParticipant
Inheritance
PersistenceIOParticipant

Remarks

A host executes the following steps (or stages) when persisting an instance:

  1. Collects values to be persisted.

  2. Maps fields of monolithic structured values to individual values.

  3. Issues the SaveWorkflowCommand to the persistence provider.

  4. Performs I/O under the persistence transaction.

A host completes a stage before beginning the next stage. For example when persisting, the host collects values from all the persistence participants before moving to the second stage. In the second stage, the host provides all the values collected in the first stage to all persistence participants in the second stage for mapping. In the third stage, the host provides all the collected values in the first and second stages to the persistence provider when invoking the SaveWorkflowCommand. Then in the fourth stage, the host provides all the collected values to all the persistence IO participants under the persistence transaction.

A host executes the following stages when loading a persistence instance:

  1. Issues the LoadWorkflowCommand and LoadWorkflowByInstanceKeyCommand to the persistence provider.

  2. Performs I/O under the persistence transaction.

  3. Publishes the loaded values.

At the highest level, workflow instance extensions that derive from the PersistenceParticipant class can participate in the first (Collect) and second (Map) stages of persisting process and the third stage (Publish) of loading process. Workflow instance extensions deriving from the PersistenceIOParticipant class can additionally participate in the fourth stage of the persisting process and the second stage of the loading process (I/O).

Constructors

PersistenceIOParticipant(Boolean, Boolean)

Initializes an instance of the PersistenceIOParticipant class.

Methods

Abort()

Aborts the pending IO (Load or Save) operation.

BeginOnLoad(IDictionary<XName,Object>, TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to load additional state in conjunction with an instance being loaded from the instance store.

BeginOnSave(IDictionary<XName,Object>, IDictionary<XName,Object>, TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to save additional state in conjunction with an instance being persisted to the instance store.

CollectValues(IDictionary<XName,Object>, IDictionary<XName,Object>)

A host invokes this method on a custom persistence participant to collect read-write values and write-only values, to be persisted.

(Inherited from PersistenceParticipant)
EndOnLoad(IAsyncResult)

Completes the asynchronous Load operation.

EndOnSave(IAsyncResult)

Completes the asynchronous Save operation.

Equals(Object)

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

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MapValues(IDictionary<XName,Object>, IDictionary<XName,Object>)

A host invokes this method after it is done with collecting the values in the first stage. The host forwards two read-only dictionaries of values it collected from all persistence participants during the first stage (CollectValues stage) to this method for mapping. The host adds values in the dictionary returned by this method to the collection of write-only values.

(Inherited from PersistenceParticipant)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
PublishValues(IDictionary<XName,Object>)

The host invokes this method and passes all the loaded values in the InstanceData collection (filled by the LoadWorkflowCommand or LoadWorkflowByInstanceKeyCommand) as a dictionary parameter.

(Inherited from PersistenceParticipant)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to