public IAsyncResult BeginExecute(InstanceHandle handle, InstancePersistenceCommand command, TimeSpan timeout, AsyncCallback callback, object state) { if (command == null) { throw Fx.Exception.ArgumentNull("command"); } if (handle == null) { throw Fx.Exception.ArgumentNull("handle"); } if (!object.ReferenceEquals(this, handle.Store)) { throw Fx.Exception.Argument("handle", SRCore.ContextNotFromThisStore); } TimeoutHelper.ThrowIfNegativeArgument(timeout); return(InstancePersistenceContext.BeginOuterExecute(handle, command, timeout, callback, state)); }
public InstanceView Execute(InstanceHandle handle, InstancePersistenceCommand command, TimeSpan timeout) { if (command == null) { throw Fx.Exception.ArgumentNull("command"); } if (handle == null) { throw Fx.Exception.ArgumentNull("handle"); } if (!object.ReferenceEquals(this, handle.Store)) { throw Fx.Exception.Argument("handle", SRCore.ContextNotFromThisStore); } TimeoutHelper.ThrowIfNegativeArgument(timeout); return(InstancePersistenceContext.OuterExecute(handle, command, timeout)); }
protected internal virtual IAsyncResult BeginTryCommand(InstancePersistenceContext context, InstancePersistenceCommand command, TimeSpan timeout, AsyncCallback callback, object state) { return(new CompletedAsyncResult <bool>(false, callback, state)); }
protected internal virtual bool TryCommand(InstancePersistenceContext context, InstancePersistenceCommand command, TimeSpan timeout) { return(EndTryCommand(BeginTryCommand(context, command, timeout, null, null))); }