public PortMappingEntry(uint port, string ip, string name, UPnP.Protocol protocol)
 {
     try
     {
         Port     = port;
         Ip       = ip;
         Name     = name;
         Protocol = protocol;
     }
     catch (Exception)
     {
         throw new InvalidCastException("Couldn't create portmapping entry");
     }
 }
		public PortMappingEntry(uint port, string ip, string name, UPnP.Protocol protocol)
		{
			try
			{
				Port = port;
				Ip = ip;
				Name = name;
				Protocol = protocol;
			}
			catch (Exception)
			{
				throw new InvalidCastException("Couldn't create portmapping entry");
			}
		}
		public PortMappingEntry(uint port, string ip, string name, string protocol)
		{
			try
			{
				Port = port;
				Ip = ip;
				Name = name;
				if (protocol.ToLower().Contains("udp"))
					Protocol = UPnP.Protocol.UDP;
				else
					Protocol = UPnP.Protocol.TCP;
			}
			catch (Exception)
			{
				throw new InvalidCastException("Couldn't create portmapping entry");
			}
		}
 public PortMappingEntry(uint port, string ip, string name, string protocol)
 {
     try
     {
         Port = port;
         Ip   = ip;
         Name = name;
         if (protocol.ToLower().Contains("udp"))
         {
             Protocol = UPnP.Protocol.UDP;
         }
         else
         {
             Protocol = UPnP.Protocol.TCP;
         }
     }
     catch (Exception)
     {
         throw new InvalidCastException("Couldn't create portmapping entry");
     }
 }