InstanceStore.TryCommand(InstancePersistenceContext, InstancePersistenceCommand, TimeSpan) Método
Definição
Um provedor de persistência implementa esse método, que determina se um comando de persistência específico pode ser executado e se o comando é executado de forma assíncrona.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
Parâmetros
- context
- InstancePersistenceContext
O contexto da instância.The instance context.
- command
- InstancePersistenceCommand
O comando a ser executado.The command to be executed.
- timeout
- TimeSpan
O valor de tempo limite para a operação.Timeout value for the operation.
Retornos
Uma implementação de provedor de persistência deverá retornar false se não der suporte ao comando passado como um parâmetro; caso contrário, deverá retornar true ou gerar uma exceção.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.
Comentários
Se o comando puder ser executado, o provedor de persistência chamará métodos relevantes no InstancePersistenceContext para fornecer os resultados do comando.If the command can be executed, the persistence provider calls relevant methods on the InstancePersistenceContext to provide the results of the command.