Пример #1
0
            private void ApplyRollbackStrategy(IRollbackStrategy rollbackStrategy, IEnumerator
                                               values)
            {
                IObjectContainer objectContainer = _transaction.ObjectContainer();

                while (values.MoveNext())
                {
                    rollbackStrategy.Rollback(objectContainer, values.Current);
                }
            }
        public bool Execute()
        {
            // we don't want to repeat executed actions...
            if (executed || ExecuteAction())
            {
                executed = true;
                return(true);
            }

            if (rollbackStrategy == null)
            {
                // by default, we will rollback command itself
                rollbackStrategy = new RollbackOneStrategy(this);
            }

            rollbackStrategy.Rollback();
            return(false);
        }
			private void ApplyRollbackStrategy(IRollbackStrategy rollbackStrategy, IEnumerator
				 values)
			{
				IObjectContainer objectContainer = _transaction.ObjectContainer();
				while (values.MoveNext())
				{
					rollbackStrategy.Rollback(objectContainer, values.Current);
				}
			}