예제 #1
0
        protected override void Close()
        {
            base.Close();

            if (_stream != null)
            {
                _stream.Dispose();
                _stream = null;
            }
        }
예제 #2
0
        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);
        }