コード例 #1
0
 public override string ToString()
 {
     if (String.IsNullOrWhiteSpace(ClientIdentifier.Server))
     {
         return(Name);
     }
     return(String.Format(CultureInfo.InvariantCulture, "{0} ({1})", Name, ClientIdentifier.ToServerPortString()));
 }
コード例 #2
0
        public void ClientIdentifier_ToServerAndPortString_WithServer()
        {
            var identifier = new ClientIdentifier("Foo", "Bar", ClientSettings.NoPort, Guid.Empty);

            Assert.AreEqual("Bar", identifier.ToServerPortString());
        }