protected override void Close() { base.Close(); if (_stream != null) { _stream.Dispose(); _stream = null; } }
protected override SmartSubtransportStream Action(string url, GitSmartSubtransportAction action) { switch (action) { // Both of these mean we're starting a new connection case GitSmartSubtransportAction.UploadPackList: _stream = new SshExeTransportStream(this, url, "git-upload-pack"); break; case GitSmartSubtransportAction.ReceivePackList: _stream = new SshExeTransportStream(this, url, "git-receive-pack"); break; case GitSmartSubtransportAction.UploadPack: case GitSmartSubtransportAction.ReceivePack: break; default: throw new InvalidOperationException("Invalid action for subtransport"); } return(_stream); }