public void UpdateTCPPort(int newPort) { if (newPort > 0) { tcpPortModified = true; TCP = new ProtocolData() { Host = TCP.Host, Port = newPort }; } }
public void ReadXml(XmlReader reader) { if (reader.HasAttributes) { ID = DataHelper.StringToInt(reader["ID"] ?? String.Empty, 0); Name = reader["Name"] ?? String.Empty; URI = reader["URI"] ?? String.Empty; UDP = new ProtocolData(reader["UDP"]); TCP = new ProtocolData(reader["TCP"]); HTTP = new ProtocolData(reader["HTTP"]); Login = reader["Login"] ?? String.Empty; Password = StringHelper.GetBytes(reader["Password"] ?? String.Empty); } reader.Read(); }