Skip to content

Commit 5a156c8

Browse files
Generating results also in Xml file(RawCodeMetrisReport.xml)
1 parent 0d45d95 commit 5a156c8

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

MetricsExtractor/Custom/TypeMetricWithNamespace.cs

+4-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Xml.Serialization;
1+
using System.Collections.Generic;
42
using ArchiMetrics.Common.Metrics;
53

64
namespace MetricsExtractor.Custom
75
{
8-
[Serializable]
96
public class TypeMetricWithNamespace : ITypeMetric
107
{
118
public TypeMetricWithNamespace(ITypeMetric typeMetric)
@@ -19,7 +16,6 @@ public TypeMetricWithNamespace(ITypeMetric typeMetric)
1916
}
2017
}
2118

22-
[XmlIgnore]
2319
public IEnumerable<ITypeCoupling> ClassCouplings { get; private set; }
2420

2521
public int LinesOfCode { get; private set; }
@@ -32,13 +28,10 @@ public TypeMetricWithNamespace(ITypeMetric typeMetric)
3228

3329
public string Name { get; private set; }
3430

35-
[XmlIgnore]
3631
public AccessModifierKind AccessModifier { get; private set; }
3732

38-
[XmlIgnore]
3933
public TypeMetricKind Kind { get; private set; }
4034

41-
[XmlIgnore]
4235
public IEnumerable<IMemberMetric> MemberMetrics { get; private set; }
4336

4437
public int DepthOfInheritance { get; private set; }
@@ -54,7 +47,7 @@ public TypeMetricWithNamespace(ITypeMetric typeMetric)
5447
public bool IsAbstract { get; private set; }
5548

5649
public string Namespace { get; private set; }
57-
50+
5851
public string FullName { get { return string.Format("{0}.{1}", Namespace, Name); } }
5952

6053
public ClassRank Rank { get; private set; }
@@ -79,11 +72,11 @@ public override bool Equals(object obj)
7972

8073
return typeMetric.FullName == FullName;
8174
}
82-
75+
8376
public override int GetHashCode()
8477
{
8578
// TODO: write your implementation of GetHashCode() here
8679
return FullName.GetHashCode();
8780
}
8881
}
89-
}
82+
}

MetricsExtractor/EstadoDoProjeto.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4+
using System.Xml.Serialization;
45
using MetricsExtractor.Custom;
56

67
namespace MetricsExtractor
@@ -11,7 +12,7 @@ public class EstadoDoProjeto
1112
private Dictionary<ClassRank, int> totalDeClassesPorRank;
1213
public int Manutenibilidade { get; set; }
1314
public int TotalDeMetodos { get; set; }
14-
public IList<MetodoRuim> MetodosRuins { get; set; }
15+
public List<MetodoRuim> MetodosRuins { get; set; }
1516

1617
public double PercentualDeMetodosRuins
1718
{
@@ -42,6 +43,7 @@ public int MetodosGrandes
4243

4344
public double ProfuDeHeranca { get; set; }
4445

46+
[XmlIgnore]
4547
public Dictionary<ClassRank, int> TotalDeClassesPorRank
4648
{
4749
get
@@ -51,6 +53,7 @@ public Dictionary<ClassRank, int> TotalDeClassesPorRank
5153
}
5254
}
5355

56+
[XmlIgnore]
5457
public Dictionary<ClassRank, List<TypeMetricWithNamespace>> TypesWithMetrics { get; set; }
5558

5659
public override string ToString()

0 commit comments

Comments
 (0)