| File: Generated\361d1da7f942c932\Microsoft_Diagnostics_DataContractReader_Data.ProbeExtensionResult.g.cs | |
| Project: 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>ProbeExtensionResult</c> type.</summary> partial class ProbeExtensionResult { private static readonly string[] _typeNames = new[] { "ProbeExtensionResult" }; [UsesDataDescriptorTypeSize] public static uint GetSize(Target target) => checked((uint)TypeLayout.Resolve(target, _typeNames).InstanceSize); [DataDescriptorDependency("Type", "int32")] public static int GetTypeOffset(Target target) { TypeLayout layout = TypeLayout.Resolve(target, _typeNames); layout.Select(default, out var type, out _, out var name, "Type"); return type.Fields[name].Offset; } public TargetPointer Address { get; } private readonly Target _target; private readonly TypeLayout _layout; public ProbeExtensionResult(Target target, TargetPointer address) { Address = address; _target = target; _layout = TypeLayout.Resolve(target, _typeNames); } static ProbeExtensionResult IData<ProbeExtensionResult>.Create(Target target, TargetPointer address) => new ProbeExtensionResult(target, address); private int _Type__value = default!; private bool _Type__read; [DataDescriptorDependency("Type", "int32")] public partial int Type { get { if (!_Type__read) { _layout.Select(Address, out var t, out var b, out var n, "Type"); _Type__value = _target.ReadField<int>(b, t, n); _Type__read = true; } return _Type__value; } } [DataDescriptorDependency("Type", "int32")] internal bool TryReadAllFields() { try { _ = Type; return true; } catch (VirtualReadException) { return false; } } }