Beispiel #1
0
        public bool HasSource(Issue issue)
        {
            var prj  = Proyectos.First(p => p.Key == issue.project);
            var comp = prj.Components.First(c => c.key == issue.component);

            return(comp.source != null);
        }
Beispiel #2
0
        public List <SourceLine> SourceLines(Issue issue)
        {
            var comp       = Proyectos.First(p => p.Key == issue.project).Components.First(c => c.key == issue.component);
            var startIndex = issue.line - 1;
            var endIndex   = Math.Min(issue.line + 3, comp.source.lines.Count());

            return(comp.source.lines.Skip(startIndex).Take(endIndex - startIndex).ToList());
        }