// <auto-generated/>
#nullable enable
using Microsoft.Diagnostics.DataContractReader;
using Microsoft.Diagnostics.DataContractReader.Contracts;
using Microsoft.Diagnostics.DataContractReader.Generated;
namespace Microsoft.Diagnostics.DataContractReader.Data;
/// <summary>Wraps the <c>JITNotification</c> type.</summary>
partial class JITNotification : global::Microsoft.Diagnostics.DataContractReader.Data.IReadableData
{
private static readonly string[] _typeNames = new[] { "JITNotification" };
[UsesDataDescriptorTypeSize]
public static uint GetSize(Target target)
=> checked((uint)LayoutSet.Resolve(target, _typeNames).InstanceSize);
[DataDescriptorDependency("State", "uint16")]
public static int GetStateOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "State");
return type.Fields[name].Offset;
}
[DataDescriptorDependency("ClrModule", "nuint")]
public static int GetClrModuleOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "ClrModule");
return type.Fields[name].Offset;
}
[DataDescriptorDependency("MethodToken", "uint32")]
public static int GetMethodTokenOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "MethodToken");
return type.Fields[name].Offset;
}
public TargetPointer Address { get; }
private readonly Target _target;
private readonly LayoutSet _layouts;
partial void OnInit(Target target, TargetPointer address);
public JITNotification(Target target, TargetPointer address)
{
Address = address;
_target = target;
_layouts = LayoutSet.Resolve(target, _typeNames);
OnInit(target, address);
}
static JITNotification IData<JITNotification>.Create(Target target, TargetPointer address)
=> new JITNotification(target, address);
[DataDescriptorDependency("State", "uint16")]
public void WriteState(ushort value)
{
_layouts.Select(Address, out var t, out var b, out var n, "State");
_target.WriteField<ushort>(b, t, n, value);
State = value;
}
[DataDescriptorDependency("ClrModule", "nuint")]
public void WriteClrModule(TargetNUInt value)
{
_layouts.Select(Address, out var t, out var b, out var n, "ClrModule");
_target.WriteNUIntField(b, t, n, value);
ClrModule = value;
}
[DataDescriptorDependency("MethodToken", "uint32")]
public void WriteMethodToken(uint value)
{
_layouts.Select(Address, out var t, out var b, out var n, "MethodToken");
_target.WriteField<uint>(b, t, n, value);
MethodToken = value;
}
private ushort _State__value = default!;
private bool _State__read;
[DataDescriptorDependency("State", "uint16")]
public partial ushort State
{
get
{
if (!_State__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "State");
_State__value = _target.ReadField<ushort>(b, t, n);
_State__read = true;
}
return _State__value;
}
private set
{
_State__value = value;
_State__read = true;
}
}
private TargetNUInt _ClrModule__value = default!;
private bool _ClrModule__read;
[DataDescriptorDependency("ClrModule", "nuint")]
public partial TargetNUInt ClrModule
{
get
{
if (!_ClrModule__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "ClrModule");
_ClrModule__value = _target.ReadNUIntField(b, t, n);
_ClrModule__read = true;
}
return _ClrModule__value;
}
private set
{
_ClrModule__value = value;
_ClrModule__read = true;
}
}
private uint _MethodToken__value = default!;
private bool _MethodToken__read;
[DataDescriptorDependency("MethodToken", "uint32")]
public partial uint MethodToken
{
get
{
if (!_MethodToken__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "MethodToken");
_MethodToken__value = _target.ReadField<uint>(b, t, n);
_MethodToken__read = true;
}
return _MethodToken__value;
}
private set
{
_MethodToken__value = value;
_MethodToken__read = true;
}
}
[DataDescriptorDependency("State", "uint16")]
[DataDescriptorDependency("ClrModule", "nuint")]
[DataDescriptorDependency("MethodToken", "uint32")]
void global::Microsoft.Diagnostics.DataContractReader.Data.IReadableData.EnsureAllFieldsRead()
{
_ = State;
_ = ClrModule;
_ = MethodToken;
}
}