Skip to content

Commit c306dbf

Browse files
SourceGen: More progress
1 parent 2c083ca commit c306dbf

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/////////////////////////////////////////////
2+
/// Filename: GenerateObjectSource.cs
3+
/// Date: March 14, 2025
4+
/// Authors: Maverick Liberty
5+
//////////////////////////////////////////////
6+
using EppNet.SourceGen.Models;
7+
8+
using System.Collections.Generic;
9+
10+
namespace EppNet.SourceGen.Source
11+
{
12+
13+
public class GenerateObjectSource
14+
{
15+
16+
public NetworkObjectModel Model { get; }
17+
18+
public string FullyQualifiedName { get; }
19+
20+
public HashSet<string> Imports;
21+
22+
public GenerateObjectSource(NetworkObjectModel model, string fullyQualifiedName)
23+
{
24+
this.Model = model;
25+
this.FullyQualifiedName = fullyQualifiedName;
26+
}
27+
28+
29+
30+
}
31+
32+
}

EppNet-SourceGen/Source/Globals.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
using System.Collections.Generic;
1616
using System.Linq;
1717
using System.Reflection;
18-
using System.Text;
1918
using System.Threading;
2019

2120
namespace EppNet.SourceGen

EppNet-SourceGen/Source/Models/NetworkParameterTypeModel.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public bool Equals(NetworkParameterTypeModel other) =>
3737
FullyQualifiedName == other.FullyQualifiedName &&
3838
Subtypes == other.Subtypes &&
3939
UnderlyingTypeFullyQualifiedName == other.UnderlyingTypeFullyQualifiedName &&
40-
IsNetObject == other.IsNetObject;
40+
IsNetObject == other.IsNetObject ^
41+
IsTuple == other.IsTuple;
4142

4243
public override string ToString()
4344
{
@@ -66,7 +67,8 @@ public override int GetHashCode() =>
6667
FullyQualifiedName.GetHashCode() ^
6768
((Subtypes != null) ? Subtypes.GetHashCode() : 1) ^
6869
((UnderlyingTypeFullyQualifiedName != null) ? UnderlyingTypeFullyQualifiedName.GetHashCode() : 1) ^
69-
IsNetObject.GetHashCode();
70+
IsNetObject.GetHashCode() ^
71+
IsTuple.GetHashCode();
7072

7173
public static bool operator ==(NetworkParameterTypeModel left, NetworkParameterTypeModel right) =>
7274
left.Equals(right);

0 commit comments

Comments
 (0)