InstancePersistenceContext Class
Represents execution state information while a persistence command is being executed.
Assembly: System.Runtime.DurableInstancing (in System.Runtime.DurableInstancing.dll)
| Name | Description | |
|---|---|---|
![]() | InstanceHandle | Gets the current instance handle. |
![]() | InstanceVersion | Gets the version of the lock held on the current instance by the current instance handle. |
![]() | InstanceView | Gets 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. |
![]() | LockToken | Gets the lock token of the instance owner bound to the current instance handle. |
![]() | UserContext | Gets the user context information attached to the current instance handle. |
| Name | Description | |
|---|---|---|
![]() | AssociatedInstanceKey(Guid) | Indicates 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. |
![]() | BeginBindReclaimedLock(Int64, TimeSpan, AsyncCallback^, Object^) | Begin 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. |
![]() | BeginExecute(InstancePersistenceCommand^, TimeSpan, AsyncCallback^, Object^) | Begins executing a persistence command asynchronously. |
![]() | BindAcquiredLock(Int64) | Binds a newly acquired lock on an instance to the current instance handle. The version of the acquired lock is passed as a parameter. |
![]() | BindEvent(InstancePersistenceEvent^) | Binds an InstancePersistenceEvent to an instance handle. |
![]() | BindInstance(Guid) | Binds an instance whose identifier is specified as a parameter to the current instance handle. |
![]() | BindInstanceOwner(Guid, Guid) | Binds an instance owner to the current instance handle. |
![]() | BindReclaimedLock(Int64, TimeSpan) | Binds an existing lock on an instance to the current instance handle. The version of the existing lock is passed as a parameter. |
![]() | CompletedInstance() | Indicates that the persistence provider has successfully marked the current instance as complete in the instance store. |
![]() | CompletedInstanceKey(Guid) | Indicates 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. |
![]() | CreateBindReclaimedLockException(Int64) | Creates an instance of an exception which can be thrown from TryCommand to trigger BindReclaimedLock behavior. |
![]() | EndBindReclaimedLock(IAsyncResult^) | Ends the asynchronous operation started by the BeginBindReclaimedLock method. |
![]() | EndExecute(IAsyncResult^) | Ends the asynchronous operation. |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Execute(InstancePersistenceCommand^, TimeSpan) | Executes a persistence command. |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | LoadedInstance(InstanceState, IDictionary<XName^, InstanceValue^>^, IDictionary<XName^, InstanceValue^>^, IDictionary<Guid, IDictionary<XName^, InstanceValue^>^>^, IDictionary<Guid, IDictionary<XName^, InstanceValue^>^>^) | Indicates that the persistence provider has successfully retrieved the current instance from the instance store. |
![]() | PersistedInstance(IDictionary<XName^, InstanceValue^>^) | Indicates 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. |
![]() | QueriedInstanceStore(InstanceStoreQueryResult^) | Adds the InstanceStoreQueryResult passed as a parameter to a list of InstanceStoreQueryResult objects in an InstanceView. |
![]() | ReadInstanceKeyMetadata(Guid, IDictionary<XName^, InstanceValue^>^, Boolean) | Indicates that the persistence provider has successfully read some instance key metadata for a key associated to the current instance from the instance store. |
![]() | ReadInstanceMetadata(IDictionary<XName^, InstanceValue^>^, Boolean) | Indicates that the persistence provider has successfully read some instance metadata for the current instance from the instance store. |
![]() | ReadInstanceOwnerMetadata(IDictionary<XName^, InstanceValue^>^, Boolean) | Sets the instance owner metadata using the data passed in the parameter. |
![]() | SetCancellationHandler(Action<InstancePersistenceContext^>^) | Sets the cancellation handler to be called when the cancel of an operation is requested. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
![]() | UnassociatedInstanceKey(Guid) | Indicates 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. |
![]() | WroteInstanceKeyMetadataValue(Guid, XName^, InstanceValue^) | Indicates 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 |
![]() | WroteInstanceMetadataValue(XName^, InstanceValue^) | Indicates that the persistence provider has successfully written a metadata value for the current instance to the external instance store. |
![]() | WroteInstanceOwnerMetadataValue(XName^, InstanceValue^) | Indicates that the persistence provider has successfully written a metadata value for the current instance owner to the instance store. |
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.
Available since 4.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

