示例#1
0
文件: Mapping.cs 项目: pangfd/SAEA
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = PublicPort;
         hashCode = (hashCode * 397) ^ (PrivateIP != null ? PrivateIP.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ PrivatePort;
         return(hashCode);
     }
 }
示例#2
0
        internal string GetMacAndPrivateIPs()
        {
            var list = MacAddresses.List();

            for (int i = 0; i < list.Count; i++)
            {
                list[i] += " : " + PrivateIP.ForMAC(list[i]);
            }

            return(string.Join(L.f, list));
        }
示例#3
0
 public void PrivateIPWithValidAddress_ReturnsAddressAsInt()
 {
     Assert.AreEqual(3232235777, PrivateIP.ToUInt32());
 }
示例#4
0
 public void PrivateIPWithValidAddress_ReturnsTrue()
 {
     Assert.IsTrue(PrivateIP.IsPrivateAddress());
 }
示例#5
0
 internal string GetPrivateIP(string macAddress)
 => PrivateIP.ForMAC(macAddress);
示例#6
0
 private static void ConnectCenter()
 {
     Center = new CenterServer(PrivateIP.ToString(), 8383); // NOTE: Is a constant value needed for this?
     Center.Connect();
 }