SetPass() public method

Return a new URI matching this one, but with a different password.
public SetPass ( string n ) : URIish
n string the new value for password.
return URIish
コード例 #1
0
 public TransportException(URIish uri, string s)
     : base(uri.SetPass(null) + ": " + s)
 {
 }
コード例 #2
0
 public TransportException(URIish uri, string s, Exception cause)
     : base(uri.SetPass(null) + ": " + s, cause)
 {
 }
コード例 #3
0
ファイル: URIishTests.cs プロジェクト: dev218/GitSharp
 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));
 }