Skip to content

Commit 984ced4

Browse files
committed
Created Memory namespace and moved files.
1 parent f0623e8 commit 984ced4

31 files changed

+71
-56
lines changed

AddressParser/Interpreter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System;
44
using System.Diagnostics.Contracts;
55
using System.Linq;
6+
using ReClassNET.Memory;
67
using ReClassNET.Util;
78

89
namespace ReClassNET.AddressParser

Forms/MainForm.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using ReClassNET.CodeGenerator;
1010
using ReClassNET.DataExchange;
1111
using ReClassNET.Logger;
12+
using ReClassNET.Memory;
1213
using ReClassNET.Nodes;
1314
using ReClassNET.Plugins;
1415
using ReClassNET.UI;
@@ -21,7 +22,7 @@ public partial class MainForm : IconForm
2122
private readonly NativeHelper nativeHelper;
2223

2324
private readonly RemoteProcess remoteProcess;
24-
private readonly Memory memory;
25+
private readonly MemoryBuffer memory;
2526

2627
private readonly PluginManager pluginManager;
2728

@@ -58,7 +59,7 @@ public MainForm(NativeHelper nativeHelper)
5859
}
5960
};
6061

61-
memory = new Memory
62+
memory = new MemoryBuffer
6263
{
6364
Process = remoteProcess
6465
};

Forms/PluginForm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
using System.Drawing;
55
using System.Linq;
66
using System.Windows.Forms;
7+
using ReClassNET.Memory;
78
using ReClassNET.Plugins;
89
using ReClassNET.UI;
9-
using ReClassNET.Util;
1010

1111
namespace ReClassNET.Forms
1212
{

Forms/ProcessBrowserForm.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Linq;
88
using System.Windows.Forms;
99
using ReClassNET.Forms;
10+
using ReClassNET.Memory;
1011
using ReClassNET.UI;
1112
using ReClassNET.Util;
1213

Forms/ProcessMemoryViewForm.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Linq;
66
using System.Windows.Forms;
77
using ReClassNET.Forms;
8+
using ReClassNET.Memory;
89
using ReClassNET.UI;
910
using ReClassNET.Util;
1011

Util/Memory.cs renamed to Memory/Memory.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
using System.Diagnostics.Contracts;
33
using System.Runtime.InteropServices;
44
using System.Text;
5+
using ReClassNET.Util;
56

6-
namespace ReClassNET.Util
7+
namespace ReClassNET.Memory
78
{
8-
public class Memory
9+
public class MemoryBuffer
910
{
1011
public RemoteProcess Process { get; set; }
1112

@@ -28,26 +29,26 @@ public int Size
2829

2930
public int Offset { get; set; }
3031

31-
public Memory()
32+
public MemoryBuffer()
3233
{
3334
Contract.Ensures(data != null);
3435

3536
data = new byte[0];
3637
}
3738

38-
public Memory(Memory other)
39+
public MemoryBuffer(MemoryBuffer other)
3940
{
4041
Contract.Requires(other != null);
4142
Contract.Ensures(data != null);
4243

4344
data = other.data;
4445
}
4546

46-
public Memory Clone()
47+
public MemoryBuffer Clone()
4748
{
48-
Contract.Ensures(Contract.Result<Memory>() != null);
49+
Contract.Ensures(Contract.Result<MemoryBuffer>() != null);
4950

50-
return new Memory(this)
51+
return new MemoryBuffer(this)
5152
{
5253
Offset = Offset,
5354
Process = Process

Util/NativeHelper.cs renamed to Memory/NativeHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
using System.Diagnostics.Contracts;
44
using System.Linq;
55
using System.Runtime.InteropServices;
6+
using ReClassNET.Util;
67

7-
namespace ReClassNET.Util
8+
namespace ReClassNET.Memory
89
{
910
public class NativeHelper : IDisposable
1011
{

Util/ProcessInfo.cs renamed to Memory/ProcessInfo.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
using System;
22
using System.Diagnostics.Contracts;
3+
using ReClassNET.Util;
34

4-
namespace ReClassNET.Util
5+
namespace ReClassNET.Memory
56
{
67
public class ProcessInfo : IDisposable
78
{

Util/RemoteProcess.cs renamed to Memory/RemoteProcess.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
using System.Threading.Tasks;
1010
using ReClassNET.AddressParser;
1111
using ReClassNET.SymbolReader;
12+
using ReClassNET.Util;
1213

13-
namespace ReClassNET.Util
14+
namespace ReClassNET.Memory
1415
{
1516
public class RemoteProcess
1617
{

Nodes/BaseFunctionPtrNode.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Diagnostics.Contracts;
4+
using ReClassNET.Memory;
45
using ReClassNET.UI;
56
using ReClassNET.Util;
67

@@ -14,7 +15,7 @@ public abstract class BaseFunctionPtrNode : BaseNode
1415
/// <summary>Size of the node in bytes.</summary>
1516
public override int MemorySize => IntPtr.Size;
1617

17-
public override string GetToolTipText(HotSpot spot, Memory memory)
18+
public override string GetToolTipText(HotSpot spot, MemoryBuffer memory)
1819
{
1920
var ptr = memory.ReadObject<IntPtr>(Offset);
2021

@@ -84,7 +85,7 @@ public override int CalculateHeight(ViewInfo view)
8485
return h;
8586
}
8687

87-
private void DisassembleRemoteCode(Memory memory, IntPtr address)
88+
private void DisassembleRemoteCode(MemoryBuffer memory, IntPtr address)
8889
{
8990
Contract.Requires(memory != null);
9091

0 commit comments

Comments
 (0)