コード例 #1
0
 public void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (!_isDisposed)
         {
             if (null != _trimDatabase)
             {
                 if (_trimDatabase is SDK.Database)
                 {
                     try
                     {
                         _trimDatabase.Dispose();
                         _trimDatabase = null;
                     }
                     catch
                     {
                         throw;
                     }
                 }
                 else
                 {
                     throw new Exception(string.Format("Attempting to dispose: {0}.", _trimDatabase.GetType().Name));
                 }
             }
             _isDisposed = true;
         }
     }
 }