InstanceStore.BeginTryCommand 方法

定义

永久性提供程序可实现此方法,这可确定是否可执行特定的永久性命令。 如果可以执行此命令,请异步执行此命令。

protected public:
 virtual IAsyncResult ^ BeginTryCommand(System::Runtime::DurableInstancing::InstancePersistenceContext ^ context, System::Runtime::DurableInstancing::InstancePersistenceCommand ^ command, TimeSpan timeout, AsyncCallback ^ callback, System::Object ^ state);
protected internal virtual IAsyncResult BeginTryCommand (System.Runtime.DurableInstancing.InstancePersistenceContext context, System.Runtime.DurableInstancing.InstancePersistenceCommand command, TimeSpan timeout, AsyncCallback callback, object state);
abstract member BeginTryCommand : System.Runtime.DurableInstancing.InstancePersistenceContext * System.Runtime.DurableInstancing.InstancePersistenceCommand * TimeSpan * AsyncCallback * obj -> IAsyncResult
override this.BeginTryCommand : System.Runtime.DurableInstancing.InstancePersistenceContext * System.Runtime.DurableInstancing.InstancePersistenceCommand * TimeSpan * AsyncCallback * obj -> IAsyncResult
Protected Friend Overridable Function BeginTryCommand (context As InstancePersistenceContext, command As InstancePersistenceCommand, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

参数

context
InstancePersistenceContext

实例上下文。

command
InstancePersistenceCommand

要执行的永久性命令。

timeout
TimeSpan

命令执行的超时值。

callback
AsyncCallback

可接收异步操作完成通知的异步回调接收委托。

state
Object

状态信息。

返回

异步操作的状态。

注解

如果可执行此命令,永久性提供程序会对 InstancePersistenceContext 调用相关方法,以提供此命令的结果。

警告

即使此方法声明为 virtual 而不是 abstract,也没有实现。 必须重写此方法才能提供功能。

适用于