File: _generated\31\Microsoft_Diagnostics_DataContractReader_Data.Debugger.g.cs
Web Access
Project: src\runtime\src\native\managed\cdac\Microsoft.Diagnostics.DataContractReader.Contracts\Microsoft.Diagnostics.DataContractReader.Contracts.csproj (Microsoft.Diagnostics.DataContractReader.Contracts)
// <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>Debugger</c> type.</summary>
partial class Debugger : global::Microsoft.Diagnostics.DataContractReader.Data.IReadableData
{
    private static readonly string[] _typeNames = new[] { "Debugger" };

    [UsesDataDescriptorTypeSize]
    public static uint GetSize(Target target)
        => checked((uint)LayoutSet.Resolve(target, _typeNames).InstanceSize);

    [DataDescriptorDependency("LeftSideInitialized", "int32")]
    public static int GetLeftSideInitializedOffset(Target target)
    {
        LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
        layouts.Select(default, out var type, out _, out var name, "LeftSideInitialized");
        return type.Fields[name].Offset;
    }

    [DataDescriptorDependency("RCThread", "pointer")]
    public static int GetRCThreadOffset(Target target)
    {
        LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
        layouts.Select(default, out var type, out _, out var name, "RCThread");
        return type.Fields[name].Offset;
    }

    [DataDescriptorDependency("RSRequestedSync", "int32")]
    public static int GetRSRequestedSyncOffset(Target target)
    {
        LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
        layouts.Select(default, out var type, out _, out var name, "RSRequestedSync");
        return type.Fields[name].Offset;
    }

    [DataDescriptorDependency("SendExceptionsOutsideOfJMC", "int32")]
    public static int GetSendExceptionsOutsideOfJMCOffset(Target target)
    {
        LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
        layouts.Select(default, out var type, out _, out var name, "SendExceptionsOutsideOfJMC");
        return type.Fields[name].Offset;
    }

    [DataDescriptorDependency("GCNotificationEventsEnabled", "int32")]
    public static int GetGCNotificationEventsEnabledOffset(Target target)
    {
        LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
        layouts.Select(default, out var type, out _, out var name, "GCNotificationEventsEnabled");
        return type.Fields[name].Offset;
    }

    [DataDescriptorDependency("RgHijackFunction", "pointer")]
    public static int GetRgHijackFunctionOffset(Target target)
    {
        LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);
        layouts.Select(default, out var type, out _, out var name, "RgHijackFunction");
        return type.Fields[name].Offset;
    }

    public TargetPointer Address { get; }

    private readonly Target _target;

    private readonly LayoutSet _layouts;

    public Debugger(Target target, TargetPointer address)
    {
        Address = address;
        _target = target;
        _layouts = LayoutSet.Resolve(target, _typeNames);
    }

    static Debugger IData<Debugger>.Create(Target target, TargetPointer address)
        => new Debugger(target, address);

    [DataDescriptorDependency("RSRequestedSync", "int32")]
    public void WriteRSRequestedSync(int value)
    {
        _layouts.Select(Address, out var t, out var b, out var n, "RSRequestedSync");
        _target.WriteField<int>(b, t, n, value);
        RSRequestedSync = value;
    }

    [DataDescriptorDependency("SendExceptionsOutsideOfJMC", "int32")]
    public void WriteSendExceptionsOutsideOfJMC(int value)
    {
        _layouts.Select(Address, out var t, out var b, out var n, "SendExceptionsOutsideOfJMC");
        _target.WriteField<int>(b, t, n, value);
        SendExceptionsOutsideOfJMC = value;
    }

    [DataDescriptorDependency("GCNotificationEventsEnabled", "int32")]
    public void WriteGCNotificationEventsEnabled(int value)
    {
        _layouts.Select(Address, out var t, out var b, out var n, "GCNotificationEventsEnabled");
        _target.WriteField<int>(b, t, n, value);
        GCNotificationEventsEnabled = value;
    }

    private int _LeftSideInitialized__value = default!;
    private bool _LeftSideInitialized__read;
    [DataDescriptorDependency("LeftSideInitialized", "int32")]
    public partial int LeftSideInitialized
    {
        get
        {
            if (!_LeftSideInitialized__read)
            {
                _layouts.Select(Address, out var t, out var b, out var n, "LeftSideInitialized");
                _LeftSideInitialized__value = _target.ReadField<int>(b, t, n);
                _LeftSideInitialized__read = true;
            }
            return _LeftSideInitialized__value;
        }
    }

    private TargetPointer _RCThread__value = default!;
    private bool _RCThread__read;
    [DataDescriptorDependency("RCThread", "pointer")]
    public partial TargetPointer RCThread
    {
        get
        {
            if (!_RCThread__read)
            {
                _layouts.Select(Address, out var t, out var b, out var n, "RCThread");
                _RCThread__value = _target.ReadPointerField(b, t, n);
                _RCThread__read = true;
            }
            return _RCThread__value;
        }
    }

    private int _RSRequestedSync__value = default!;
    private bool _RSRequestedSync__read;
    [DataDescriptorDependency("RSRequestedSync", "int32")]
    public partial int RSRequestedSync
    {
        get
        {
            if (!_RSRequestedSync__read)
            {
                _layouts.Select(Address, out var t, out var b, out var n, "RSRequestedSync");
                _RSRequestedSync__value = _target.ReadField<int>(b, t, n);
                _RSRequestedSync__read = true;
            }
            return _RSRequestedSync__value;
        }
        private set
        {
            _RSRequestedSync__value = value;
            _RSRequestedSync__read = true;
        }
    }

    private int _SendExceptionsOutsideOfJMC__value = default!;
    private bool _SendExceptionsOutsideOfJMC__read;
    [DataDescriptorDependency("SendExceptionsOutsideOfJMC", "int32")]
    public partial int SendExceptionsOutsideOfJMC
    {
        get
        {
            if (!_SendExceptionsOutsideOfJMC__read)
            {
                _layouts.Select(Address, out var t, out var b, out var n, "SendExceptionsOutsideOfJMC");
                _SendExceptionsOutsideOfJMC__value = _target.ReadField<int>(b, t, n);
                _SendExceptionsOutsideOfJMC__read = true;
            }
            return _SendExceptionsOutsideOfJMC__value;
        }
        private set
        {
            _SendExceptionsOutsideOfJMC__value = value;
            _SendExceptionsOutsideOfJMC__read = true;
        }
    }

    private int _GCNotificationEventsEnabled__value = default!;
    private bool _GCNotificationEventsEnabled__read;
    [DataDescriptorDependency("GCNotificationEventsEnabled", "int32")]
    public partial int GCNotificationEventsEnabled
    {
        get
        {
            if (!_GCNotificationEventsEnabled__read)
            {
                _layouts.Select(Address, out var t, out var b, out var n, "GCNotificationEventsEnabled");
                _GCNotificationEventsEnabled__value = _target.ReadField<int>(b, t, n);
                _GCNotificationEventsEnabled__read = true;
            }
            return _GCNotificationEventsEnabled__value;
        }
        private set
        {
            _GCNotificationEventsEnabled__value = value;
            _GCNotificationEventsEnabled__read = true;
        }
    }

    private TargetPointer _RgHijackFunction__value = default!;
    private bool _RgHijackFunction__read;
    [DataDescriptorDependency("RgHijackFunction", "pointer")]
    public partial TargetPointer RgHijackFunction
    {
        get
        {
            if (!_RgHijackFunction__read)
            {
                _layouts.Select(Address, out var t, out var b, out var n, "RgHijackFunction");
                _RgHijackFunction__value = _target.ReadPointerField(b, t, n);
                _RgHijackFunction__read = true;
            }
            return _RgHijackFunction__value;
        }
    }

    [DataDescriptorDependency("LeftSideInitialized", "int32")]
    [DataDescriptorDependency("RCThread", "pointer")]
    [DataDescriptorDependency("RSRequestedSync", "int32")]
    [DataDescriptorDependency("SendExceptionsOutsideOfJMC", "int32")]
    [DataDescriptorDependency("GCNotificationEventsEnabled", "int32")]
    [DataDescriptorDependency("RgHijackFunction", "pointer")]
    void global::Microsoft.Diagnostics.DataContractReader.Data.IReadableData.EnsureAllFieldsRead()
    {
        _ = LeftSideInitialized;
        _ = RCThread;
        _ = RSRequestedSync;
        _ = SendExceptionsOutsideOfJMC;
        _ = GCNotificationEventsEnabled;
        _ = RgHijackFunction;
    }

}