ChinhDo.Transactions.TxFileManager.TxEnlistment.RollbackDirectory.Rollback C# (CSharp) Method

Rollback() public method

public Rollback ( ) : void
return void
				public override void Rollback()
				{
					if (!_existed)
					{
						if (Directory.GetFiles(_path).Length == 0 && Directory.GetDirectories(_path).Length == 0)
						{
							// Delete the dir only if it's empty
							Directory.Delete(_path);
						}
						else
						{
							EventLog.WriteEntry(GetType().FullName, "Failed to delete directory " + _path + ". Directory was not empty.", EventLogEntryType.Warning);
						}
					}
				}
TxFileManager.TxEnlistment.RollbackDirectory