Dev2.DynamicServices.FileSystemInstanceStore.TryCommand C# (CSharp) Method

TryCommand() protected method

protected TryCommand ( System.Runtime.DurableInstancing.InstancePersistenceContext context, System.Runtime.DurableInstancing.InstancePersistenceCommand command, System.TimeSpan timeout ) : bool
context System.Runtime.DurableInstancing.InstancePersistenceContext
command System.Runtime.DurableInstancing.InstancePersistenceCommand
timeout System.TimeSpan
return bool
        protected override bool TryCommand(
            InstancePersistenceContext context,
            InstancePersistenceCommand command, TimeSpan timeout)
        {
            ManualResetEvent waitEvent = new ManualResetEvent(false);
            IAsyncResult asyncResult = BeginTryCommand(
                context, command, timeout, ar => waitEvent.Set(), null);

            waitEvent.WaitOne(timeout);
            return EndTryCommand(asyncResult);
        }