Пример #1
0
 public void ProcessPart(PatchPart part)
 {
     if (DiffsRemaining == 1 && UsingLine != null)
     {
         ChunkWithUsing !.FlipFirstCharacter(UsingLine.Value, '-');
         DiffsRemaining -= 1;
     }
 }
Пример #2
0
        PatchPart ParsePart()
        {
            PatchPart part = new PatchPart(Lines.Skip(Index).Take(4).ToList());

            Expect("diff --git");
            Advance(3);
            Expect("+++");
            part.FileName = Current.Split(new char [] { '/' }, 2) [1];
            Advance();

            foreach (var chunk in ParsePatch())
            {
                part.Add(chunk);
            }

            return(part);
        }
Пример #3
0
 public void Add(PatchPart parth) => Parts.Add(parth);