InstanceStore.BeginTryCommand Method (InstancePersistenceContext, InstancePersistenceCommand, TimeSpan, AsyncCallback, Object)

.NET Framework (current version)

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.

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

protected internal virtual IAsyncResult BeginTryCommand(
	InstancePersistenceContext context,
	InstancePersistenceCommand command,
	TimeSpan timeout,
	AsyncCallback callback,
	object state


Type: System.Runtime.DurableInstancing.InstancePersistenceContext

The instance context.

Type: System.Runtime.DurableInstancing.InstancePersistenceCommand

The persistence command to be executed.

Type: System.TimeSpan

The timeout value for the command execution.

Type: System.AsyncCallback

The asynchronous callback delegate that receives notification of the completion of the asynchronous operation.

Type: System.Object

The state information.

Return Value

Type: System.IAsyncResult

The state of the asynchronous operation.

If the command can be executed, the persistence provider calls relevant methods on the InstancePersistenceContext to provide the results of the command.


Even though this method is declared as virtual rather than abstract, there is no implementation. This method must be overridden in order to provide functionality.

.NET Framework
Available since 4.0
Return to top