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; }
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; }
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; }