// <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>ProfControlBlock</c> type.</summary>
partial class ProfControlBlock : global::Microsoft.Diagnostics.DataContractReader.Data.IReadableData
{
private static readonly string[] _typeNames = new[] { "ProfControlBlock" };
[UsesDataDescriptorTypeSize]
public static uint GetSize(Target target)
=> checked((uint)LayoutSet.Resolve(target, _typeNames).InstanceSize);
[DataDescriptorDependency("GlobalEventMask", "uint64")]
public static int GetGlobalEventMaskOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "GlobalEventMask");
return type.Fields[name].Offset;
}
[DataDescriptorDependency("RejitOnAttachEnabled", "uint8")]
public static int GetRejitOnAttachEnabledOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "RejitOnAttachEnabled");
return type.Fields[name].Offset;
}
[DataDescriptorDependency("MainProfilerProfInterface", "pointer")]
public static int GetMainProfilerProfInterfaceOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "MainProfilerProfInterface");
return type.Fields[name].Offset;
}
[DataDescriptorDependency("NotificationProfilerCount", "int32")]
public static int GetNotificationProfilerCountOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "NotificationProfilerCount");
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 ProfControlBlock(Target target, TargetPointer address)
{
Address = address;
_target = target;
_layouts = LayoutSet.Resolve(target, _typeNames);
OnInit(target, address);
}
static ProfControlBlock IData<ProfControlBlock>.Create(Target target, TargetPointer address)
=> new ProfControlBlock(target, address);
private ulong _GlobalEventMask__value = default!;
private bool _GlobalEventMask__read;
[DataDescriptorDependency("GlobalEventMask", "uint64")]
public partial ulong GlobalEventMask
{
get
{
if (!_GlobalEventMask__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "GlobalEventMask");
_GlobalEventMask__value = _target.ReadField<ulong>(b, t, n);
_GlobalEventMask__read = true;
}
return _GlobalEventMask__value;
}
}
private bool _RejitOnAttachEnabled__value = default!;
private bool _RejitOnAttachEnabled__read;
[DataDescriptorDependency("RejitOnAttachEnabled", "uint8")]
public partial bool RejitOnAttachEnabled
{
get
{
if (!_RejitOnAttachEnabled__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "RejitOnAttachEnabled");
_RejitOnAttachEnabled__value = _target.ReadField<byte>(b, t, n) != 0;
_RejitOnAttachEnabled__read = true;
}
return _RejitOnAttachEnabled__value;
}
}
private TargetPointer _MainProfilerProfInterface__value = default!;
private bool _MainProfilerProfInterface__read;
[DataDescriptorDependency("MainProfilerProfInterface", "pointer")]
public partial TargetPointer MainProfilerProfInterface
{
get
{
if (!_MainProfilerProfInterface__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "MainProfilerProfInterface");
_MainProfilerProfInterface__value = _target.ReadPointerField(b, t, n);
_MainProfilerProfInterface__read = true;
}
return _MainProfilerProfInterface__value;
}
}
private int _NotificationProfilerCount__value = default!;
private bool _NotificationProfilerCount__read;
[DataDescriptorDependency("NotificationProfilerCount", "int32")]
public partial int NotificationProfilerCount
{
get
{
if (!_NotificationProfilerCount__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "NotificationProfilerCount");
_NotificationProfilerCount__value = _target.ReadField<int>(b, t, n);
_NotificationProfilerCount__read = true;
}
return _NotificationProfilerCount__value;
}
}
[DataDescriptorDependency("GlobalEventMask", "uint64")]
[DataDescriptorDependency("RejitOnAttachEnabled", "uint8")]
[DataDescriptorDependency("MainProfilerProfInterface", "pointer")]
[DataDescriptorDependency("NotificationProfilerCount", "int32")]
void global::Microsoft.Diagnostics.DataContractReader.Data.IReadableData.EnsureAllFieldsRead()
{
_ = GlobalEventMask;
_ = RejitOnAttachEnabled;
_ = MainProfilerProfInterface;
_ = NotificationProfilerCount;
}
}