File: Data\ILCodeVersionNode.cs
Web Access
Project: src\src\runtime\src\native\managed\cdac\Microsoft.Diagnostics.DataContractReader.Contracts\Microsoft.Diagnostics.DataContractReader.Contracts.csproj (Microsoft.Diagnostics.DataContractReader.Contracts)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;

namespace Microsoft.Diagnostics.DataContractReader.Data;

internal sealed class ILCodeVersionNode : IData<ILCodeVersionNode>
{
    static ILCodeVersionNode IData<ILCodeVersionNode>.Create(Target target, TargetPointer address) => new ILCodeVersionNode(target, address);
    public ILCodeVersionNode(Target target, TargetPointer address)
    {
        Target.TypeInfo type = target.GetTypeInfo(DataType.ILCodeVersionNode);

        VersionId = target.ReadNUIntField(address, type, nameof(VersionId));
        Next = target.ReadPointerField(address, type, nameof(Next));
        RejitState = target.ReadField<uint>(address, type, nameof(RejitState));
        ILAddress = target.ReadPointerField(address, type, nameof(ILAddress));
    }

    public TargetNUInt VersionId { get; init; }
    public TargetPointer Next { get; init; }
    public uint RejitState { get; init; }
    public TargetPointer ILAddress { get; init; }
}