using System.Text;
namespace XFESystem.NativeKernel;
internal static class HardwareNotInvoked
{
public static int Attempts;
public static InvalidOperationException Fail() { Attempts++; return new("Hardware paths are forbidden in host firmware fixture tests."); }
}
public static class PhysicalMemory
{
public static ulong Allocate() => throw HardwareNotInvoked.Fail();
public static ulong ToVirtual(ulong physical) => throw HardwareNotInvoked.Fail();
}
public static class VirtualMemory
{
public static ulong MapDeviceReadOnly(ulong physical, ulong bytes) => throw HardwareNotInvoked.Fail();
public static bool UnmapDevice(ulong address, ulong bytes) => throw HardwareNotInvoked.Fail();
}
public static class Serial
{
public static readonly StringBuilder Text = new();
public static void Write(string text) => Text.Append(text);
public static void Line(string text) => Text.AppendLine(text);
public static void Number(ulong number) => Text.Append(number);
public static void Hex(ulong number) => Text.Append(number.ToString("x"));
}
using System.Text;
namespace XFESystem.NativeKernel;
internal static class HardwareNotInvoked
{
public static int Attempts;
public static InvalidOperationException Fail() { Attempts++; return new("Hardware paths are forbidden in host firmware fixture tests."); }
}
public static class PhysicalMemory
{
public static ulong Allocate() => throw HardwareNotInvoked.Fail();
public static ulong ToVirtual(ulong physical) => throw HardwareNotInvoked.Fail();
}
public static class VirtualMemory
{
public static ulong MapDeviceReadOnly(ulong physical, ulong bytes) => throw HardwareNotInvoked.Fail();
public static bool UnmapDevice(ulong address, ulong bytes) => throw HardwareNotInvoked.Fail();
}
public static class Serial
{
public static readonly StringBuilder Text = new();
public static void Write(string text) => Text.Append(text);
public static void Line(string text) => Text.AppendLine(text);
public static void Number(ulong number) => Text.Append(number);
public static void Hex(ulong number) => Text.Append(number.ToString("x"));
}