Ejemplo n.º 1
0
        internal ModuleExport(ModuleCoverageInfo dat)
        {
            Name = dat.ModuleName;

            Namespaces            = dat.Namespaces.Select(c => new NamespaceExport(c)).ToArray();
            LinesCovered          = dat.LinesCovered;
            LinesPartiallyCovered = dat.LinesPartiallyCovered;
            LinesNotCovered       = dat.LinesNotCovered;
            BlocksCovered         = dat.BlocksCovered;
            BlocksNotCovered      = dat.BlocksNotCovered;
        }
Ejemplo n.º 2
0
        private static ModuleCoverageInfo CreateSerializableModule(CoverageNodeModel model)
        {
            var module = new ModuleCoverageInfo();

            module.ModuleName            = model.Name;
            module.ImageSize             = (int)model.AdditionalData[nameof(module.ImageSize)];
            module.ImageLinkTime         = (int)model.AdditionalData[nameof(module.ImageLinkTime)];
            module.LinesCovered          = model.LinesCovered;
            module.LinesPartiallyCovered = model.LinesPartiallyCovered;
            module.LinesNotCovered       = model.LinesNotCovered;
            module.BlocksCovered         = model.BlocksCovered;
            module.BlocksNotCovered      = model.BlocksNotCovered;

            module.Namespaces = model.Children.Select(CreateSerializableNamespace).ToArray();

            return(module);
        }
Ejemplo n.º 3
0
        private static CoverageNodeModel ReadModule(ModuleCoverageInfo mod)
        {
            var model = new CoverageNodeModel(CoverageNodeType.Module);

            model.Name = mod.ModuleName;

            model.AdditionalData[nameof(mod.ImageSize)]     = mod.ImageSize;
            model.AdditionalData[nameof(mod.ImageLinkTime)] = mod.ImageLinkTime;

            model.LinesCovered          = mod.LinesCovered;
            model.LinesPartiallyCovered = mod.LinesPartiallyCovered;
            model.LinesNotCovered       = mod.LinesNotCovered;

            model.BlocksCovered    = mod.BlocksCovered;
            model.BlocksNotCovered = mod.BlocksNotCovered;

            foreach (var ns in mod.Namespaces)
            {
                model.Children.Add(ReadNamespace(ns));
            }

            return(model);
        }