private string GetLinesStartingWith(string prefix)
{
BufferedReader r = new BufferedReader(new StringReader(output));
string line = null;
string rv = string.Empty;
try
{
while ((line = r.ReadLine()) != null)
{
if (line.StartsWith(prefix))
{
if (rv.Length > 0)
{
rv += "\n";
}
rv += line;
}
}
return rv;
}
catch (IOException)
{
throw new Exception("Can't happen.");
}
}