Exemple #1
0
 public FileReader(int timesPerSecond, string FileName)
 {
     data         = new ThreadSafeDataQueue <string[]>();
     readerThread = new Thread(() => ReadFile())
     {
         IsBackground = true
     };
     readerThread.Start();
 }
Exemple #2
0
 public ClientReader(TcpClient client, int timesPerSecond, string[] commands)
 {
     this.client         = client;
     this.timesPerSecond = timesPerSecond;
     this.commands       = commands;
     data         = new ThreadSafeDataQueue <string[]>();
     readerThread = new Thread(() => GetCommands())
     {
         IsBackground = true
     };
     readerThread.Start();
 }