Exemplo n.º 1
0
        public void testSshProtoWithUserPassAndPort()
        {
            const string str = "ssh://*****:*****@example.com:33/some/p ath";
            var          u   = new URIish(str);

            Assert.AreEqual("ssh", u.Scheme);
            Assert.IsTrue(u.IsRemote);
            Assert.AreEqual("/some/p ath", u.Path);
            Assert.AreEqual("example.com", u.Host);
            Assert.AreEqual("user", u.User);
            Assert.AreEqual("pass", u.Pass);
            Assert.AreEqual(33, u.Port);
            Assert.AreEqual(str, u.ToPrivateString());
            Assert.AreEqual(u.SetPass(null).ToPrivateString(), u.ToString());
            Assert.AreEqual(u, new URIish(str));
        }
 public TransportException(URIish uri, string s)
     : base(uri.SetPass(null) + ": " + s)
 {
 }
 public TransportException(URIish uri, string s, Exception cause)
     : base(uri.SetPass(null) + ": " + s, cause)
 {
 }
Exemplo n.º 4
0
 /// <summary>
 /// Constructs an UnsupportedCredentialItem with the specified detail message
 /// prefixed with provided URI.
 /// </summary>
 /// <remarks>
 /// Constructs an UnsupportedCredentialItem with the specified detail message
 /// prefixed with provided URI.
 /// </remarks>
 /// <param name="uri">URI used for transport</param>
 /// <param name="s">message</param>
 public UnsupportedCredentialItem(URIish uri, string s) : base(uri.SetPass(null) +
                                                               ": " + s)
 {
 }