Example #1
0
		protected virtual void Dispose(bool disposing)
		{
			lock (this._disposeThreadSafetyLock)
			{
				if (!this._disposed)
				{
					this._disposed = true;
				}
				else
				{
					return;
				}
			}
			if (disposing)
			{
				this._handle.Dispose();
				CimApplication.RemoveTracking(this);
			}
		}
Example #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (!this._disposed)
     {
         if (disposing)
         {
             this.Close();
             if (this._cancellationTokenRegistration != null)
             {
                 this._cancellationTokenRegistration.Dispose();
                 this._cancellationTokenRegistration = null;
             }
             CimApplication.RemoveTracking(this);
         }
         this._disposed = true;
         return;
     }
     else
     {
         return;
     }
 }