|
// 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 Assembly : IData<Assembly>
{
static Assembly IData<Assembly>.Create(Target target, TargetPointer address) => new Assembly(target, address);
public Assembly(Target target, TargetPointer address)
{
Target.TypeInfo type = target.GetTypeInfo(DataType.Assembly);
Module = target.ReadPointerField(address, type, nameof(Module));
IsCollectible = target.ReadField<byte>(address, type, nameof(IsCollectible));
IsDynamic = target.ReadField<byte>(address, type, nameof(IsDynamic)) != 0;
Error = target.ReadPointerField(address, type, nameof(Error));
NotifyFlags = target.ReadField<uint>(address, type, nameof(NotifyFlags));
IsLoaded = target.ReadField<byte>(address, type, nameof(IsLoaded)) != 0;
}
public TargetPointer Module { get; init; }
public byte IsCollectible { get; init; }
public bool IsDynamic { get; init; }
public TargetPointer Error { get; init; }
public uint NotifyFlags { get; init; }
public bool IsLoaded { get; init; }
public bool IsError => Error != TargetPointer.Null;
}
|