Skip to content

Commit 77c375c

Browse files
Using new version of ArchiMetrics
1 parent cec5d58 commit 77c375c

8 files changed

+224
-95
lines changed

ArchiMetrics

Submodule ArchiMetrics updated 368 files

MetricsExtractor.sln

+8-15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.23107.0
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26430.6
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MetricsExtractor", "MetricsExtractor\MetricsExtractor.csproj", "{9DC6404C-B685-4733-ACB0-94504FD05E64}"
77
EndProject
@@ -12,9 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1212
EndProject
1313
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ArchiMetrics", "ArchiMetrics", "{4F0B2B4F-2D17-45A3-B6CC-F1A7C2D5E762}"
1414
EndProject
15-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchiMetrics.Analysis", "ArchiMetrics\ArchiMetrics.Analysis\ArchiMetrics.Analysis.csproj", "{67478EFB-3E11-4459-B1CE-47FE37F1F968}"
16-
EndProject
17-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchiMetrics.Common", "ArchiMetrics\ArchiMetrics.Common\ArchiMetrics.Common.csproj", "{D8BE9D36-EC03-4EEE-91DA-F9D8C9FD11D2}"
15+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArchiMetrics.Analysis", "ArchiMetrics\src\ArchiMetrics.Analysis\ArchiMetrics.Analysis.csproj", "{2DFDEAE8-41AA-4C80-A5A7-BBB82FDFD8BA}"
1816
EndProject
1917
Global
2018
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -26,20 +24,15 @@ Global
2624
{9DC6404C-B685-4733-ACB0-94504FD05E64}.Debug|Any CPU.Build.0 = Debug|Any CPU
2725
{9DC6404C-B685-4733-ACB0-94504FD05E64}.Release|Any CPU.ActiveCfg = Release|Any CPU
2826
{9DC6404C-B685-4733-ACB0-94504FD05E64}.Release|Any CPU.Build.0 = Release|Any CPU
29-
{67478EFB-3E11-4459-B1CE-47FE37F1F968}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30-
{67478EFB-3E11-4459-B1CE-47FE37F1F968}.Debug|Any CPU.Build.0 = Debug|Any CPU
31-
{67478EFB-3E11-4459-B1CE-47FE37F1F968}.Release|Any CPU.ActiveCfg = Release|Any CPU
32-
{67478EFB-3E11-4459-B1CE-47FE37F1F968}.Release|Any CPU.Build.0 = Release|Any CPU
33-
{D8BE9D36-EC03-4EEE-91DA-F9D8C9FD11D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34-
{D8BE9D36-EC03-4EEE-91DA-F9D8C9FD11D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
35-
{D8BE9D36-EC03-4EEE-91DA-F9D8C9FD11D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
36-
{D8BE9D36-EC03-4EEE-91DA-F9D8C9FD11D2}.Release|Any CPU.Build.0 = Release|Any CPU
27+
{2DFDEAE8-41AA-4C80-A5A7-BBB82FDFD8BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28+
{2DFDEAE8-41AA-4C80-A5A7-BBB82FDFD8BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
29+
{2DFDEAE8-41AA-4C80-A5A7-BBB82FDFD8BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
30+
{2DFDEAE8-41AA-4C80-A5A7-BBB82FDFD8BA}.Release|Any CPU.Build.0 = Release|Any CPU
3731
EndGlobalSection
3832
GlobalSection(SolutionProperties) = preSolution
3933
HideSolutionNode = FALSE
4034
EndGlobalSection
4135
GlobalSection(NestedProjects) = preSolution
42-
{67478EFB-3E11-4459-B1CE-47FE37F1F968} = {4F0B2B4F-2D17-45A3-B6CC-F1A7C2D5E762}
43-
{D8BE9D36-EC03-4EEE-91DA-F9D8C9FD11D2} = {4F0B2B4F-2D17-45A3-B6CC-F1A7C2D5E762}
36+
{2DFDEAE8-41AA-4C80-A5A7-BBB82FDFD8BA} = {4F0B2B4F-2D17-45A3-B6CC-F1A7C2D5E762}
4437
EndGlobalSection
4538
EndGlobal

MetricsExtractor/App.config

+37-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
55
</startup>
66
<runtime>
77
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
@@ -21,6 +21,42 @@
2121
<assemblyIdentity name="System.Composition.Hosting" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
2222
<bindingRedirect oldVersion="0.0.0.0-1.0.30.0" newVersion="1.0.30.0" />
2323
</dependentAssembly>
24+
<dependentAssembly>
25+
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
26+
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
27+
</dependentAssembly>
28+
<dependentAssembly>
29+
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
30+
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
31+
</dependentAssembly>
32+
<dependentAssembly>
33+
<assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
34+
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
35+
</dependentAssembly>
36+
<dependentAssembly>
37+
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
38+
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
39+
</dependentAssembly>
40+
<dependentAssembly>
41+
<assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
42+
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
43+
</dependentAssembly>
44+
<dependentAssembly>
45+
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
46+
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
47+
</dependentAssembly>
48+
<dependentAssembly>
49+
<assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
50+
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
51+
</dependentAssembly>
52+
<dependentAssembly>
53+
<assemblyIdentity name="System.Diagnostics.FileVersionInfo" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
54+
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
55+
</dependentAssembly>
56+
<dependentAssembly>
57+
<assemblyIdentity name="System.Threading.Thread" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
58+
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
59+
</dependentAssembly>
2460
</assemblyBinding>
2561
</runtime>
2662
</configuration>

MetricsExtractor/Custom/TypeMetricWithNamespace.cs

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
1-
using System.Collections.Generic;
2-
using ArchiMetrics.Common.Metrics;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using ArchiMetrics.Analysis.Common.Metrics;
35

46
namespace MetricsExtractor.Custom
57
{
68
public class TypeMetricWithNamespace : ITypeMetric
79
{
10+
static readonly Type MyType = typeof(TypeMetricWithNamespace);
11+
812
public TypeMetricWithNamespace(ITypeMetric typeMetric)
913
{
1014
var type = typeMetric.GetType();
11-
var myType = typeof(TypeMetricWithNamespace);
12-
foreach (var property in type.GetProperties())
15+
var props = type.GetProperties()
16+
.Join(MyType.GetProperties(), p => p.Name, p => p.Name, Tuple.Create);
17+
18+
foreach (var property in props)
1319
{
14-
var prop = myType.GetProperty(property.Name);
15-
prop.SetValue(this, property.GetValue(typeMetric));
20+
var value = property.Item1.GetValue(typeMetric);
21+
property.Item2.SetValue(this, value);
1622
}
1723
}
1824

1925
public IEnumerable<ITypeCoupling> ClassCouplings { get; private set; }
2026

27+
public IEnumerable<ITypeCoupling> Dependencies { get; private set; }
28+
2129
public int LinesOfCode { get; private set; }
2230

2331
public int SourceLinesOfCode { get; private set; }

MetricsExtractor/MetodoComTipo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using ArchiMetrics.Common.Metrics;
1+
using ArchiMetrics.Analysis.Common.Metrics;
22
using MetricsExtractor.Custom;
33

44
namespace MetricsExtractor

0 commit comments

Comments
 (0)