File: Data\CtxEntry.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 CtxEntry : IData<CtxEntry>
{
    static CtxEntry IData<CtxEntry>.Create(Target target, TargetPointer address) => new CtxEntry(target, address);
    public CtxEntry(Target target, TargetPointer address)
    {
        Target.TypeInfo type = target.GetTypeInfo(DataType.CtxEntry);

        STAThread = target.ReadPointerField(address, type, nameof(STAThread));
        CtxCookie = target.ReadPointerField(address, type, nameof(CtxCookie));
    }

    public TargetPointer STAThread { get; init; }
    public TargetPointer CtxCookie { get; init; }
}