fix: BaseAddressResolver should take a ISigScanner instead

This commit is contained in:
goat 2023-10-05 23:15:34 +02:00
parent 2405dca9e1
commit db5b9d1b83
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
16 changed files with 21 additions and 21 deletions

View file

@ -18,7 +18,7 @@ public abstract class BaseAddressResolver
public static Dictionary<string, List<(string ClassName, IntPtr Address)>> DebugScannedValues { get; } = new();
/// <summary>
/// Gets or sets a value indicating whether the resolver has successfully run <see cref="Setup32Bit(SigScanner)"/> or <see cref="Setup64Bit(SigScanner)"/>.
/// Gets or sets a value indicating whether the resolver has successfully run <see cref="Setup32Bit(ISigScanner)"/> or <see cref="Setup64Bit(ISigScanner)"/>.
/// </summary>
protected bool IsResolved { get; set; }
@ -26,7 +26,7 @@ public abstract class BaseAddressResolver
/// Setup the resolver, calling the appropriate method based on the process architecture.
/// </summary>
/// <param name="scanner">The SigScanner instance.</param>
public void Setup(SigScanner scanner)
public void Setup(ISigScanner scanner)
{
// Because C# don't allow to call virtual function while in ctor
// we have to do this shit :\
@ -83,7 +83,7 @@ public abstract class BaseAddressResolver
/// Setup the resolver by finding any necessary memory addresses.
/// </summary>
/// <param name="scanner">The SigScanner instance.</param>
protected virtual void Setup32Bit(SigScanner scanner)
protected virtual void Setup32Bit(ISigScanner scanner)
{
throw new NotSupportedException("32 bit version is not supported.");
}
@ -92,7 +92,7 @@ public abstract class BaseAddressResolver
/// Setup the resolver by finding any necessary memory addresses.
/// </summary>
/// <param name="scanner">The SigScanner instance.</param>
protected virtual void Setup64Bit(SigScanner scanner)
protected virtual void Setup64Bit(ISigScanner scanner)
{
throw new NotSupportedException("64 bit version is not supported.");
}
@ -101,7 +101,7 @@ public abstract class BaseAddressResolver
/// Setup the resolver by finding any necessary memory addresses.
/// </summary>
/// <param name="scanner">The SigScanner instance.</param>
protected virtual void SetupInternal(SigScanner scanner)
protected virtual void SetupInternal(ISigScanner scanner)
{
// Do nothing
}