File: _generated\26\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
{
    private static readonly string[] _typeNames = new[] { "Debugger" };

    public TargetPointer Address { get; }

    private readonly Target _target;

    partial void OnInit(Target target, TargetPointer address);

    public Debugger(Target target, TargetPointer address)
    {
        Address = address;
        _target = target;

        LayoutSet layouts = LayoutSet.Resolve(target, _typeNames);

        {
            layouts.Select(address, out var t, out var b, out var n, "LeftSideInitialized");
            LeftSideInitialized = target.ReadField<int>(b, t, n);
        }
        {
            layouts.Select(address, out var t, out var b, out var n, "Defines");
            Defines = target.ReadField<uint>(b, t, n);
        }
        {
            layouts.Select(address, out var t, out var b, out var n, "MDStructuresVersion");
            MDStructuresVersion = target.ReadField<uint>(b, t, n);
        }
        {
            layouts.Select(address, out var t, out var b, out var n, "RCThread");
            RCThread = target.ReadPointerField(b, t, n);
        }
        {
            layouts.Select(address, out var t, out var b, out var n, "RSRequestedSync");
            RSRequestedSync = target.ReadField<int>(b, t, n);
        }
        {
            layouts.Select(address, out var t, out var b, out var n, "SendExceptionsOutsideOfJMC");
            SendExceptionsOutsideOfJMC = target.ReadField<int>(b, t, n);
        }
        {
            layouts.Select(address, out var t, out var b, out var n, "GCNotificationEventsEnabled");
            GCNotificationEventsEnabled = target.ReadField<int>(b, t, n);
        }

        OnInit(target, address);
    }

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

    public void WriteRSRequestedSync(int value)
    {
        LayoutSet layouts = LayoutSet.Resolve(_target, _typeNames);
        layouts.Select(Address, out var t, out var b, out var n, "RSRequestedSync");
        _target.WriteField<int>(b, t, n, value);
        RSRequestedSync = value;
    }

    public void WriteSendExceptionsOutsideOfJMC(int value)
    {
        LayoutSet layouts = LayoutSet.Resolve(_target, _typeNames);
        layouts.Select(Address, out var t, out var b, out var n, "SendExceptionsOutsideOfJMC");
        _target.WriteField<int>(b, t, n, value);
        SendExceptionsOutsideOfJMC = value;
    }

    public void WriteGCNotificationEventsEnabled(int value)
    {
        LayoutSet layouts = LayoutSet.Resolve(_target, _typeNames);
        layouts.Select(Address, out var t, out var b, out var n, "GCNotificationEventsEnabled");
        _target.WriteField<int>(b, t, n, value);
        GCNotificationEventsEnabled = value;
    }

}