Atomia.Provisioning.Modules.Folders.Folders.RollbackTransaction C# (CSharp) Method

RollbackTransaction() public method

Rollbacks the transaction.
public RollbackTransaction ( ) : void
return void
        public override void RollbackTransaction()
        {
            Exception rollback_expection = null;

            int size = this.commands.Count;
            for (int i = size - 1; i >= 0; i--)
            {
                try
                {
                    if (this.commands[i].Status == ModuleCommandStatus.Executed)
                    {
                        this.commands[i].Undo();
                    }

                    this.commands[i].CleanUp();
                }
                catch (Exception e)
                {
                    rollback_expection = e;
                }
            }

            this.commands.Clear();

            if (rollback_expection != null)
            {
                throw rollback_expection;
            }
        }