private IEnumerable <LineViewModel> GetLineViewModelsFromHunks(Hunk[] hunks)
        {
            var lines = new List <LineViewModel>();

            foreach (var hunk in hunks)
            {
                foreach (var hunkLine in hunk.Lines)
                {
                    var details = new LineDetailsViewModel(
                        hunkLine.NumberInSourceFile,
                        hunkLine.NumberInTargetFile,
                        this.mergeRequest,
                        this.change,
                        this.service);

                    var lineVm = new LineViewModel(
                        hunkLine.NumberInChanges,
                        hunkLine.NumberInSourceFile,
                        hunkLine.NumberInTargetFile,
                        hunkLine.Text,
                        details);
                    lines.Add(lineVm);
                }
            }

            return(lines);
        }
 public LineViewModel(int numberInChanges, int?numberInSourceFile, int?numberInTargetFile, string text, LineDetailsViewModel details)
     : this(numberInChanges, numberInSourceFile, numberInTargetFile, text)
 {
     this.Details = details;
     this.Items.Add(details);
 }