Bewerken

Delen via


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.

protected public:
 virtual bool TryCommand(System::Runtime::DurableInstancing::InstancePersistenceContext ^ context, System::Runtime::DurableInstancing::InstancePersistenceCommand ^ command, TimeSpan timeout);
protected internal virtual bool TryCommand (System.Runtime.DurableInstancing.InstancePersistenceContext context, System.Runtime.DurableInstancing.InstancePersistenceCommand command, TimeSpan timeout);
abstract member TryCommand : System.Runtime.DurableInstancing.InstancePersistenceContext * System.Runtime.DurableInstancing.InstancePersistenceCommand * TimeSpan -> bool
override this.TryCommand : System.Runtime.DurableInstancing.InstancePersistenceContext * System.Runtime.DurableInstancing.InstancePersistenceCommand * TimeSpan -> bool
Protected Friend Overridable Function TryCommand (context As InstancePersistenceContext, command As InstancePersistenceCommand, timeout As TimeSpan) As Boolean

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