示例#1
0
        public ComparedClass(CoverageFile parentFile, CoverageClass current, CoverageClass prev)
        {
            ParentFile = parentFile;
            _currentClass = current;
            _prevClass = prev;

            Name = current.Name;

            if (_prevClass != null)
                ComparedMethods = from m in current.Methods
                                  select new ComparedMethod(this, m, _prevClass[m.Name]);
        }
示例#2
0
        public CoverageMethod(CoverageClass parentClass, XElement methodElement)
        {
            ParentClass = parentClass;
            Name = methodElement.Attribute("name").Value;
            var lineSequences = from s in methodElement.Descendants("seqpnt")
                                let line = int.Parse(s.Attribute("l").Value)
                                where line > 0
                                group s by line;

            Lines = from line in lineSequences
                    select new CoverageLine(this, line.Key, line);
        }