Exemplo n.º 1
0
 /// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>
 /// <exception cref="InvalidOperationException">Thrown when the requested operation is invalid.</exception>
 public void Dispose()
 {
     if (this.owner != null)
     {
         try {
             if (this.owner.indent != this)
             {
                 throw new InvalidOperationException("The indenting does not match");
             }
             this.owner.indent = this.previous;
         } finally {
             this.owner = null;
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>Constructor.</summary>
 /// <param name="owner">The owner.</param>
 /// <param name="depth">The depth.</param>
 public IndentInfo(RichTextWriter owner, int depth)
 {
     this.owner    = owner;
     this.depth    = depth;
     this.previous = owner.indent;
 }