public void Execute(CommitFile commitFile, CommitLine commitLine) { var newLine = commitFile.GetCommits() .FirstOrDefault(x => x.Line == commitLine.Line); newLine.SetType(key.ToLineType()); commitFile.Replace(commitLine, newLine); }
public RebaserService(IList<string> lines, ICommitLineBuilderFactory commitLineBuilderFactory) { this.commitLineBuilderFactory = commitLineBuilderFactory; commitFile = new CommitFile(lines, this.commitLineBuilderFactory); }