Malevich.StreamCombiner.ParseDiffLine C# (CSharp) Method

ParseDiffLine() private method

Parses a line from the diff file which specifies the next line where the next diff section starts.
private ParseDiffLine ( string text ) : int
text string The line to parse.
return int
		private int ParseDiffLine(string text)
		{
			if (text == null)
				return -1;

			Match m = DiffDecoder.Match(text);
			if (m.Success)
			{
				int line = Int32.Parse(m.Groups[1].Value);
				// 'a' adds AFTER the line, but we do processing once we get to the line.
				// So we need to really get to the next line.
				if (m.Groups[3].Value.Equals("a"))
					line += 1;

				return line;
			}

			return -1;
		}