using System; namespace System.ComponentModel.Design { /// Provides a way to group a series of design-time actions to improve performance and enable most types of changes to be undone. // Token: 0x02000042 RID: 66 public abstract class DesignerTransaction : IDisposable { /// Initializes a new instance of the class with no description. // Token: 0x060002AF RID: 687 RVA: 0x0000972C File Offset: 0x0000792C protected DesignerTransaction() : this(string.Empty) { } /// Initializes a new instance of the class using the specified transaction description. /// A description for this transaction. // Token: 0x060002B0 RID: 688 RVA: 0x0000973C File Offset: 0x0000793C protected DesignerTransaction(string description) { this.description = description; this.committed = false; this.canceled = false; } /// Releases all resources used by the . // Token: 0x060002B1 RID: 689 RVA: 0x0000975C File Offset: 0x0000795C void IDisposable.Dispose() { this.Dispose(true); } /// Releases the unmanaged resources used by the and optionally releases the managed resources. /// true to release both managed and unmanaged resources; false to release only unmanaged resources. // Token: 0x060002B2 RID: 690 RVA: 0x00009768 File Offset: 0x00007968 protected virtual void Dispose(bool disposing) { this.Cancel(); if (disposing) { GC.SuppressFinalize(true); } } /// Raises the Cancel event. // Token: 0x060002B3 RID: 691 protected abstract void OnCancel(); /// Performs the actual work of committing a transaction. // Token: 0x060002B4 RID: 692 protected abstract void OnCommit(); /// Cancels the transaction and attempts to roll back the changes made by the events of the transaction. // Token: 0x060002B5 RID: 693 RVA: 0x00009784 File Offset: 0x00007984 public void Cancel() { if (!this.Canceled && !this.Committed) { this.canceled = true; this.OnCancel(); } } /// Commits this transaction. // Token: 0x060002B6 RID: 694 RVA: 0x000097AC File Offset: 0x000079AC public void Commit() { if (!this.Canceled && !this.Committed) { this.committed = true; this.OnCommit(); } } /// Gets a value indicating whether the transaction was canceled. /// true if the transaction was canceled; otherwise, false. // Token: 0x170000C8 RID: 200 // (get) Token: 0x060002B7 RID: 695 RVA: 0x000097D4 File Offset: 0x000079D4 public bool Canceled { get { return this.canceled; } } /// Gets a value indicating whether the transaction was committed. /// true if the transaction was committed; otherwise, false. // Token: 0x170000C9 RID: 201 // (get) Token: 0x060002B8 RID: 696 RVA: 0x000097DC File Offset: 0x000079DC public bool Committed { get { return this.committed; } } /// Gets a description for the transaction. /// A description for the transaction. // Token: 0x170000CA RID: 202 // (get) Token: 0x060002B9 RID: 697 RVA: 0x000097E4 File Offset: 0x000079E4 public string Description { get { return this.description; } } /// Releases the resources associated with this object. This override commits this transaction if it was not already committed. // Token: 0x060002BA RID: 698 RVA: 0x000097EC File Offset: 0x000079EC ~DesignerTransaction() { this.Dispose(false); } // Token: 0x040000C4 RID: 196 private string description; // Token: 0x040000C5 RID: 197 private bool committed; // Token: 0x040000C6 RID: 198 private bool canceled; } }