Exemple #1
0
 protected void LoadServerListData(byte[] encryptedServerListData, string password)
 {
     using (MemoryStream stream = new MemoryStream(CryptoHelper.Decrypt(encryptedServerListData, password)))
     {
         using (BinaryReader reader = new BinaryReader(stream, Encoding.UTF8))
         {
             Servers = ServerInfoList.ReadFromBinaryReader(reader);
         }
     }
 }
Exemple #2
0
        public ServerInfoList Clone()
        {
            ServerInfoList result = new ServerInfoList();

            foreach (ServerInfo serverInfo in this)
            {
                result.Add(serverInfo.Clone());
            }

            return(result);
        }
Exemple #3
0
        public static ServerInfoList ReadFromBinaryReader(BinaryReader reader)
        {
            ServerInfoList result = new ServerInfoList();
            int            count  = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                result.Add(ServerInfo.ReadFromBinaryReader(reader));
            }

            return(result);
        }
Exemple #4
0
 public Profile()
 {
     Servers = new ServerInfoList();
 }