InstanceStore.TryCommand Method

Definition

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.

C#
protected internal virtual bool TryCommand(System.Runtime.DurableInstancing.InstancePersistenceContext context, System.Runtime.DurableInstancing.InstancePersistenceCommand command, TimeSpan timeout);

Parameters

context
InstancePersistenceContext

The instance context.

command
InstancePersistenceCommand

The command to be executed.

timeout
TimeSpan

Timeout value for the operation.

Returns

A persistence provider implementation should return false if it doesn't support the command passed as a parameter; otherwise it should return true or throw an exception.

Remarks

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

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1