-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDependencyRelation.cs
More file actions
66 lines (52 loc) · 1.91 KB
/
DependencyRelation.cs
File metadata and controls
66 lines (52 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using CsvHelper.Configuration.Attributes;
namespace CodeLineCounter.Models
{
public class DependencyRelation
{
[Name("SourceClass")]
public required string SourceClass { get; set; }
[Name("SourceNamespace")]
public required string SourceNamespace { get; set; }
[Name("SourceAssembly")]
public required string SourceAssembly { get; set; }
[Name("TargetClass")]
public required string TargetClass { get; set; }
[Name("TargetNamespace")]
public required string TargetNamespace { get; set; }
[Name("TargetAssembly")]
public required string TargetAssembly { get; set; }
[Name("FilePath")]
public required string FilePath { get; set; }
[Name("StartLine")]
public int StartLine { get; set; }
[Name("IncomingDegree")]
public int IncomingDegree { get; set; }
[Name("OutgoingDegree")]
public int OutgoingDegree { get; set; }
public override bool Equals(object? obj)
{
if (obj is not DependencyRelation other)
return false;
return SourceClass == other.SourceClass &&
SourceNamespace == other.SourceNamespace &&
SourceAssembly == other.SourceAssembly &&
TargetClass == other.TargetClass &&
TargetNamespace == other.TargetNamespace &&
TargetAssembly == other.TargetAssembly &&
FilePath == other.FilePath &&
StartLine == other.StartLine;
}
public override int GetHashCode()
{
return HashCode.Combine(
SourceClass,
SourceNamespace,
SourceAssembly,
TargetClass,
TargetNamespace,
TargetAssembly,
FilePath,
StartLine);
}
}
}