public void GenerateReaderData()
 {
     for (int i = 0; i < NumberOfReaders; i++)
     {
         var r = new Reader(i, _names[_generator.Next(0, _names.Length)], _surnames[_generator.Next(0, _surnames.Length)]);
         ReadersById.Add(r);
         ReadersByName.Add(r);
     }
 }
Example #2
0
        public void ReadReadersFromFile(string filename)
        {
            StreamReader w    = new StreamReader(filename);
            string       line = "";

            while ((line = w.ReadLine()) != null)
            {
                var r = ParseReader(line);
                ReadersById.Add(r);
                ReadersByName.Add(r);
                NumberOfReaders++;
            }
            w.Close();
        }