Ejemplo n.º 1
0
        public void UpdateTCPPort(int newPort)
        {
            if (newPort > 0)
            {
                tcpPortModified = true;

                TCP = new ProtocolData()
                {
                    Host = TCP.Host, Port = newPort
                };
            }
        }
Ejemplo n.º 2
0
        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();
        }