示例#1
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (Handler != null)
         {
             Handler.Dispose();
             Handler = null;
         }
     }
     base.Dispose(disposing);
 }
示例#2
0
 /// <summary>
 /// Implements the Dispose pattern
 /// </summary>
 /// <param name="disposing">Whether this object is being disposed via a call to Dispose
 /// or garbage collected.</param>
 protected override void Dispose(bool disposing)
 {
     if (!this._isDisposed)
     {
         if (disposing && _shouldDispose)
         {
             if (components != null)
             {
                 components.Dispose();
             }
             if (Handler != null)
             {
                 Handler.Dispose();
             }
         }
         base.Dispose(disposing);
         this._isDisposed = true;
     }
 }