示例#1
0
 public void Dispose()
 {
     if (_root == null)
     {
         return;
     }
     try
     {
         if (DokanRemoveMountPoint(_mountPoint))
         {
             ServiceRegistration.Get <ILogger>().Info("Dokan: Successfully unmounted resource '{0}'", _mountPoint);
         }
         else
         {
             ServiceRegistration.Get <ILogger>().Error("Dokan: Failed to unmount resource '{0}'", _mountPoint);
         }
     }
     catch (Exception e)
     {
         ServiceRegistration.Get <ILogger>().Error("Dokan: Error unmounting resource '{0}'", e, _mountPoint);
     }
     lock (_syncObj)
         _root.Dispose();
     _root = null;
 }
示例#2
0
 public void Dispose()
 {
     if (_root == null)
     {
         return;
     }
     try
     {
         if (DokanNet.DokanUnmount(_driveLetter) == 0)
         {
             ServiceRegistration.Get <ILogger>().Error("Dokan: Failed to unmount drive '{0}'", _driveLetter);
         }
         else
         {
             ServiceRegistration.Get <ILogger>().Info("Dokan: Successfully unmounted drive '{0}'", _driveLetter);
         }
     }
     catch (Exception e)
     {
         ServiceRegistration.Get <ILogger>().Error("Dokan: Error unmounting drive '{0}'", e, _driveLetter);
     }
     lock (_syncObj)
         _root.Dispose();
     _root = null;
 }
示例#3
0
 public void Dispose()
 {
   if (_root == null)
     return;
   try
   {
     if (DokanNet.DokanUnmount(_driveLetter) == 0)
       ServiceRegistration.Get<ILogger>().Error("Dokan: Failed to unmount drive '{0}'", _driveLetter);
     else
       ServiceRegistration.Get<ILogger>().Info("Dokan: Successfully unmounted drive '{0}'", _driveLetter);
   }
   catch (Exception e)
   {
     ServiceRegistration.Get<ILogger>().Error("Dokan: Error unmounting drive '{0}'", e, _driveLetter);
   }
   lock (_syncObj)
     _root.Dispose();
   _root = null;
 }