Example #1
0
        public PortMapping GetPortMapping(int port)
        {
            PortMapping portMapping = _settings.Ports.FirstOrDefault(p => p.Port == port);

            if (portMapping == null)
            {
                portMapping = new PortMapping()
                {
                    Port = port
                }
            }
            ;
            return(portMapping);
        }
Example #2
0
 public void AddPortMapping(PortMapping portMapping)
 {
     RemovePortMapping(portMapping.Port);
     _settings.Ports.Add(portMapping);
 }