Example #1
0
        internal IAsyncResult BeginTryCommandInternalWithVersionCheck(InstancePersistenceContext context, InstancePersistenceCommand command, TimeSpan timeout, AsyncCallback callback, object state, Version targetVersion)
        {
            SqlWorkflowInstanceStoreAsyncResult sqlWorkflowInstanceStoreAsyncResult = new TestDatabaseVersionAndRunAsyncResult(context, command, this, this.storeLock, Transaction.Current, timeout, targetVersion, callback, state);

            sqlWorkflowInstanceStoreAsyncResult.ScheduleCallback();
            return(sqlWorkflowInstanceStoreAsyncResult);
        }
        static void InstanceCommandCompleteCallback(IAsyncResult result)
        {
            TestDatabaseVersionAndRunAsyncResult thisPtr = (TestDatabaseVersionAndRunAsyncResult)result.AsyncState;

            try
            {
                thisPtr.Store.EndTryCommand(result);
                thisPtr.Complete(false, null);
            }
            catch (Exception ex)
            {
                if (Fx.IsFatal(ex))
                {
                    throw;
                }

                thisPtr.Complete(false, ex);
            }
        }
 internal IAsyncResult BeginTryCommandInternalWithVersionCheck(InstancePersistenceContext context, InstancePersistenceCommand command, TimeSpan timeout, AsyncCallback callback, object state, Version targetVersion)
 {
     SqlWorkflowInstanceStoreAsyncResult sqlWorkflowInstanceStoreAsyncResult = new TestDatabaseVersionAndRunAsyncResult(context, command, this, this.storeLock, Transaction.Current, timeout, targetVersion, callback, state);
     sqlWorkflowInstanceStoreAsyncResult.ScheduleCallback();
     return sqlWorkflowInstanceStoreAsyncResult;
 }