ToPrivateString() public method

Obtain the string form of the URI, with the password included.
public ToPrivateString ( ) : string
return string
示例#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));
 }
示例#2
0
 public SubmoduleEntry(string name, string path, URIish url, UpdateMethod update)
 {
     Name = name;
     Path = path;
     Url = url;
     RawUrl = url != null ? url.ToPrivateString() : null;
     Update = update;
 }