// <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>Assembly</c> type.</summary>
partial class Assembly : global::Microsoft.Diagnostics.DataContractReader.Data.IReadableData
{
private static readonly string[] _typeNames = new[] { "Assembly" };
[UsesDataDescriptorTypeSize]
public static uint GetSize(Target target)
=> checked((uint)LayoutSet.Resolve(target, _typeNames).InstanceSize);
[DataDescriptorDependency("Module", "pointer")]
public static int GetModuleOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "Module");
return type.Fields[name].Offset;
}
[DataDescriptorDependency("IsCollectible", "uint8")]
public static int GetIsCollectibleOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "IsCollectible");
return type.Fields[name].Offset;
}
[DataDescriptorDependency("IsDynamic", "uint8")]
public static int GetIsDynamicOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "IsDynamic");
return type.Fields[name].Offset;
}
[DataDescriptorDependency("Error", "pointer")]
public static int GetErrorOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "Error");
return type.Fields[name].Offset;
}
[DataDescriptorDependency("NotifyFlags", "uint32")]
public static int GetNotifyFlagsOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "NotifyFlags");
return type.Fields[name].Offset;
}
[DataDescriptorDependency("IsLoaded", "uint8")]
public static int GetIsLoadedOffset(Target target)
{
LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
layouts.Select(default, out var type, out _, out var name, "IsLoaded");
return type.Fields[name].Offset;
}
public TargetPointer Address { get; }
private readonly Target _target;
private readonly LayoutSet _layouts;
public Assembly(Target target, TargetPointer address)
{
Address = address;
_target = target;
_layouts = LayoutSet.Resolve(target, _typeNames);
}
static Assembly IData<Assembly>.Create(Target target, TargetPointer address)
=> new Assembly(target, address);
private TargetPointer _Module__value = default!;
private bool _Module__read;
[DataDescriptorDependency("Module", "pointer")]
public partial TargetPointer Module
{
get
{
if (!_Module__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "Module");
_Module__value = _target.ReadPointerField(b, t, n);
_Module__read = true;
}
return _Module__value;
}
}
private byte _IsCollectible__value = default!;
private bool _IsCollectible__read;
[DataDescriptorDependency("IsCollectible", "uint8")]
public partial byte IsCollectible
{
get
{
if (!_IsCollectible__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "IsCollectible");
_IsCollectible__value = _target.ReadField<byte>(b, t, n);
_IsCollectible__read = true;
}
return _IsCollectible__value;
}
}
private bool _IsDynamic__value = default!;
private bool _IsDynamic__read;
[DataDescriptorDependency("IsDynamic", "uint8")]
public partial bool IsDynamic
{
get
{
if (!_IsDynamic__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "IsDynamic");
_IsDynamic__value = _target.ReadField<byte>(b, t, n) != 0;
_IsDynamic__read = true;
}
return _IsDynamic__value;
}
}
private TargetPointer _Error__value = default!;
private bool _Error__read;
[DataDescriptorDependency("Error", "pointer")]
public partial TargetPointer Error
{
get
{
if (!_Error__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "Error");
_Error__value = _target.ReadPointerField(b, t, n);
_Error__read = true;
}
return _Error__value;
}
}
private uint _NotifyFlags__value = default!;
private bool _NotifyFlags__read;
[DataDescriptorDependency("NotifyFlags", "uint32")]
public partial uint NotifyFlags
{
get
{
if (!_NotifyFlags__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "NotifyFlags");
_NotifyFlags__value = _target.ReadField<uint>(b, t, n);
_NotifyFlags__read = true;
}
return _NotifyFlags__value;
}
}
private bool _IsLoaded__value = default!;
private bool _IsLoaded__read;
[DataDescriptorDependency("IsLoaded", "uint8")]
public partial bool IsLoaded
{
get
{
if (!_IsLoaded__read)
{
_layouts.Select(Address, out var t, out var b, out var n, "IsLoaded");
_IsLoaded__value = _target.ReadField<byte>(b, t, n) != 0;
_IsLoaded__read = true;
}
return _IsLoaded__value;
}
}
[DataDescriptorDependency("Module", "pointer")]
[DataDescriptorDependency("IsCollectible", "uint8")]
[DataDescriptorDependency("IsDynamic", "uint8")]
[DataDescriptorDependency("Error", "pointer")]
[DataDescriptorDependency("NotifyFlags", "uint32")]
[DataDescriptorDependency("IsLoaded", "uint8")]
void global::Microsoft.Diagnostics.DataContractReader.Data.IReadableData.EnsureAllFieldsRead()
{
_ = Module;
_ = IsCollectible;
_ = IsDynamic;
_ = Error;
_ = NotifyFlags;
_ = IsLoaded;
}
}