forked from ReClassNET/ReClass.NET
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathScanResult.cs
More file actions
159 lines (121 loc) · 2.99 KB
/
Copy pathScanResult.cs
File metadata and controls
159 lines (121 loc) · 2.99 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
using System;
using System.Diagnostics.Contracts;
using System.Text;
namespace ReClassNET.MemoryScanner
{
public abstract class ScanResult
{
public abstract ScanValueType ValueType { get; }
public IntPtr Address { get; set; }
public abstract ScanResult Clone();
}
public class ByteScanResult : ScanResult
{
public override ScanValueType ValueType => ScanValueType.Byte;
public byte Value { get; }
public ByteScanResult(byte value)
{
Value = value;
}
public override ScanResult Clone()
{
return new ByteScanResult(Value) { Address = Address };
}
}
public class ShortScanResult : ScanResult
{
public override ScanValueType ValueType => ScanValueType.Short;
public short Value { get; }
public ShortScanResult(short value)
{
Value = value;
}
public override ScanResult Clone()
{
return new ShortScanResult(Value) { Address = Address };
}
}
public class IntegerScanResult : ScanResult
{
public override ScanValueType ValueType => ScanValueType.Integer;
public int Value { get; }
public IntegerScanResult(int value)
{
Value = value;
}
public override ScanResult Clone()
{
return new IntegerScanResult(Value) { Address = Address };
}
}
public class LongScanResult : ScanResult
{
public override ScanValueType ValueType => ScanValueType.Long;
public long Value { get; }
public LongScanResult(long value)
{
Value = value;
}
public override ScanResult Clone()
{
return new LongScanResult(Value) { Address = Address };
}
}
public class FloatScanResult : ScanResult
{
public override ScanValueType ValueType => ScanValueType.Float;
public float Value { get; }
public FloatScanResult(float value)
{
Value = value;
}
public override ScanResult Clone()
{
return new FloatScanResult(Value) { Address = Address };
}
}
public class DoubleScanResult : ScanResult
{
public override ScanValueType ValueType => ScanValueType.Double;
public double Value { get; }
public DoubleScanResult(double value)
{
Value = value;
}
public override ScanResult Clone()
{
return new DoubleScanResult(Value) { Address = Address };
}
}
public class ArrayOfBytesScanResult : ScanResult
{
public override ScanValueType ValueType => ScanValueType.ArrayOfBytes;
public byte[] Value { get; }
public ArrayOfBytesScanResult(byte[] value)
{
Contract.Requires(value != null);
Value = value;
}
public override ScanResult Clone()
{
return new ArrayOfBytesScanResult(Value) { Address = Address };
}
}
public class StringScanResult : ScanResult
{
public override ScanValueType ValueType => ScanValueType.String;
public string Value { get; }
public Encoding Encoding { get; }
public StringScanResult(string value, Encoding encoding)
{
Contract.Requires(value != null);
Contract.Requires(encoding != null);
Value = value;
Encoding = encoding;
}
public override ScanResult Clone()
{
return new StringScanResult(Value, Encoding) { Address = Address };
}
}
}