private void OpenRemoteFile() { Logger.Current.Info("Open FileReader service on ", _hostAndPort, " for file: ", _filePath); _service = new ProxyFileReader(); _service.SetHost(_hostAndPort); _service.SetCredentials(_credentials); ServiceVersion = _service.ExchangeVersion(1); _service.OpenFile(_filePath); }
protected override void Dispose(bool disposing) { if (!_disposed) { _disposed = true; if (disposing && _service != null) { var temp = _service; _service = null; temp.CloseFile(); temp.Dispose(); } base.Dispose(disposing); } }