This documentation is archived and is not being maintained.

InstancePersistenceContext Class

Represents execution state information while a persistence command is being executed.

System::Object
  System.Runtime.DurableInstancing::InstancePersistenceContext

Namespace:  System.Runtime.DurableInstancing
Assembly:  System.Runtime.DurableInstancing (in System.Runtime.DurableInstancing.dll)

public ref class InstancePersistenceContext sealed

The InstancePersistenceContext type exposes the following members.

  NameDescription
Public propertyInstanceHandleGets the current instance handle.
Public propertyInstanceVersionGets the version of the lock held on the current instance by the current instance handle.
Public propertyInstanceViewGets the instance view object that represents the in-memory state of the current instance. This view reflects updates as they are made by the command in progress.
Public propertyLockTokenGets the lock token of the instance owner bound to the current instance handle.
Public propertyUserContextGets the user context information attached to the current instance handle.
Top

  NameDescription
Public methodAssociatedInstanceKeyIndicates that the persistence provider has successfully associated a key to the current instance in the instance store. The identifier of the key is specified as a parameter.
Public methodBeginBindReclaimedLockBegin an asynchronous operation to bind an existing lock on an instance to the current instance handle. The version of the existing lock is passed as a parameter.
Public methodBeginExecuteBegins executing a persistence command asynchronously.
Public methodBindAcquiredLockBinds a newly acquired lock on an instance to the current instance handle. The version of the acquired lock is passed as a parameter.
Public methodBindEventBinds an InstancePersistenceEvent to an instance handle.
Public methodBindInstanceBinds an instance whose identifier is specified as a parameter to the current instance handle.
Public methodBindInstanceOwnerBinds an instance owner to the current instance handle.
Public methodBindReclaimedLockBinds an existing lock on an instance to the current instance handle. The version of the existing lock is passed as a parameter.
Public methodCompletedInstanceIndicates that the persistence provider has successfully marked the current instance as complete in the instance store.
Public methodCompletedInstanceKeyIndicates that the persistence provider has successfully marked a key as complete in the external store. The identifier of the key is specified as a parameter.
Public methodCreateBindReclaimedLockExceptionCreates an instance of an exception which can be thrown from TryCommand to trigger BindReclaimedLock behavior.
Public methodEndBindReclaimedLockEnds the asynchronous operation started by the BeginBindReclaimedLock(Int64, TimeSpan, AsyncCallback, Object) method.
Public methodEndExecuteEnds the asynchronous operation.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodExecuteExecutes a persistence command.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodLoadedInstanceIndicates that the persistence provider has successfully retrieved the current instance from the instance store.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodPersistedInstanceIndicates that the persistence provider has successfully persisted a set of instance data to the instance store. This has the effect of initializing the instance if it wasn’t already.
Public methodQueriedInstanceStoreAdds the InstanceStoreQueryResult passed as a parameter to a list of InstanceStoreQueryResult objects in an InstanceView.
Public methodReadInstanceKeyMetadataIndicates that the persistence provider has successfully read some instance key metadata for a key associated to the current instance from the instance store.
Public methodReadInstanceMetadataIndicates that the persistence provider has successfully read some instance metadata for the current instance from the instance store.
Public methodReadInstanceOwnerMetadataSets the instance owner metadata using the data passed in the parameter.
Public methodSetCancellationHandlerSets the cancellation handler to be called when the cancel of an operation is requested.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodUnassociatedInstanceKeyIndicates that the persistence provider has successfully disassociated a key from the current instance in the instance store. The identifier of the key is specified as a parameter.
Public methodWroteInstanceKeyMetadataValueIndicates that the persistence provider has successfully written a metadata value for an instance key that is associated with the current instance to the instance store
Public methodWroteInstanceMetadataValueIndicates that the persistence provider has successfully written a metadata value for the current instance to the external instance store.
Public methodWroteInstanceOwnerMetadataValueIndicates that the persistence provider has successfully written a metadata value for the current instance owner to the instance store.
Top

An instance of this class is passed to the TryCommand method of persistence provider implementations. Persistence providers use this class to inspect the in-memory view of the instance as well as indicate the results of operations on the external store which may affect the view or other in-memory context.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: