ChinhDo.Transactions.TxFileManager.TxEnlistment.AppendAllText C# (CSharp) Method

AppendAllText() public method

Appends the specified string the file, creating the file if it doesn't already exist.
public AppendAllText ( string path, string contents ) : void
path string The file to append the string to.
contents string The string to append to the file.
return void
			public void AppendAllText(string path, string contents)
			{
				var r = new RollbackFile(path);
				try
				{
					File.AppendAllText(path, contents);
				}
				catch (Exception e)
				{
					r.CleanUp();
					throw new Exception(e.Message, e);
				}

				if (_tx != null)
				{
					_journal.Add(r);
					Enlist();
				}
			}