Esempio n. 1
0
 private static string CreateMessage(ListenSocketAddress address1, ListenSocketAddress address2)
 {
     if (address1 == null && address2 == null)
     {
         return("Address is already in use, cannot bind to it.");
     }
     else if (address1 != null && address2 != null)
     {
         return(string.Format("At least one of the addresses {0} or {1} is already in use, cannot bind to it.", address1, address2));
     }
     else
     {
         return(string.Format("Address {0} is already in use, cannot bind to it.", address1 != null ? address1 : address2));
     }
 }
Esempio n. 2
0
 public PortBindException(ListenSocketAddress address1, ListenSocketAddress address2, Exception original) : base(CreateMessage(address1, address2))
 {
     StackTrace = original.StackTrace;
 }
Esempio n. 3
0
 public PortBindException(ListenSocketAddress address, Exception original) : this(address, null, original)
 {
 }