public string ReadLine()
{
if (LineBase == NextLine)
InDiffArea = true;
if (InDiffArea)
{
for (; ; )
{
string DiffLine = DiffTextReader.ReadLine();
if (DiffLine == null)
{
++NextLine;
return BaseTextReader.ReadLine();
}
else if (DiffLine.StartsWith("<", StringComparison.InvariantCulture))
{
++LineBase;
BaseTextReader.ReadLine();
}
else if (DiffLine.StartsWith("-", StringComparison.InvariantCulture))
{
continue;
}
else if (DiffLine.StartsWith(">", StringComparison.InvariantCulture))
{
return DiffLine.Substring(2);
}
else if (DiffLine.Equals("\\ No newline at end of file", StringComparison.InvariantCulture))
{
// This is a very annoying perforce thing. But we have to account for it.
continue;
}
else
{
NextLine = ParseDiffLine(DiffLine);
InDiffArea = false;
return ReadLine();
}
}
}
++LineBase;
return BaseTextReader.ReadLine();
}