File: Data\FieldDesc.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.

namespace Microsoft.Diagnostics.DataContractReader.Data;

internal sealed class FieldDesc : IData<FieldDesc>
{
    static FieldDesc IData<FieldDesc>.Create(Target target, TargetPointer address) => new FieldDesc(target, address);
    public FieldDesc(Target target, TargetPointer address)
    {
        Target.TypeInfo type = target.GetTypeInfo(DataType.FieldDesc);
        DWord1 = target.ReadField<uint>(address, type, nameof(DWord1));
        DWord2 = target.ReadField<uint>(address, type, nameof(DWord2));
        MTOfEnclosingClass = target.ReadPointerField(address, type, nameof(MTOfEnclosingClass));
    }

    public uint DWord1 { get; init; }
    public uint DWord2 { get; init; }
    public TargetPointer MTOfEnclosingClass { get; init; }
}