forked from ReClassNET/ReClass.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMemberDefinition.cs
More file actions
45 lines (35 loc) · 976 Bytes
/
Copy pathMemberDefinition.cs
File metadata and controls
45 lines (35 loc) · 976 Bytes
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
using System.Diagnostics.Contracts;
using ReClassNET.Nodes;
namespace ReClassNET.CodeGenerator
{
public class MemberDefinition
{
public bool IsArray => ArrayCount != 0;
public int ArrayCount { get; }
public int Offset { get; }
public string Type { get; }
public string Name { get; }
public string Comment { get; }
public MemberDefinition(BaseNode node, string type)
: this(node, type, 0)
{
}
public MemberDefinition(BaseNode node, string type, int arrayCount)
: this(type, arrayCount, node.Name, node.Offset.ToInt32(), node.Comment)
{
Contract.Requires(node != null);
Contract.Requires(type != null);
}
public MemberDefinition(string type, int arrayCount, string name, int offset, string comment)
{
Contract.Requires(type != null);
Contract.Requires(name != null);
Contract.Requires(comment != null);
ArrayCount = arrayCount;
Offset = offset;
Type = type;
Name = name;
Comment = comment;
}
}
}