void UpdatePort(Bolt.NatPortMappingStatus status, int port) { if (port < 1 || port > ushort.MaxValue) { throw new System.ArgumentOutOfRangeException("port"); } lock (syncLock) { NatPortMapping mapping = new NatPortMapping { Status = status, Internal = port, External = port }; if (portList.ContainsKey(port)) { portList.Remove(port); } portList.Add(port, mapping); } }