37 lines
470 B
C#
37 lines
470 B
C#
using System;
|
|
using System.Threading;
|
|
using System.Collections.Generic;
|
|
|
|
namespace WorldOfPeacecraft
|
|
{
|
|
public class Parser
|
|
{
|
|
private Queue<string> Buffer;
|
|
private Thread ParserThread;
|
|
|
|
public Parser()
|
|
{
|
|
Buffer = new Queue<string>();
|
|
}
|
|
|
|
public void DoParse ()
|
|
{
|
|
while (true) {
|
|
// Do awesome stuff
|
|
}
|
|
}
|
|
|
|
public void Stop ()
|
|
{
|
|
ParserThread.Abort();
|
|
}
|
|
|
|
public void AddToBuffer(string s)
|
|
{
|
|
Buffer.Enqueue(s);
|
|
}
|
|
}
|
|
}
|
|
|
|
|