// dnlib: See LICENSE.txt for more info using System.Collections.Generic; using dnlib.DotNet.Emit; namespace dnlib.DotNet.Pdb { /// /// A local variable /// public sealed class PdbLocal : IHasCustomDebugInformation { /// /// Constructor /// public PdbLocal() { } /// /// Constructor /// /// /// /// public PdbLocal(Local local, string name, PdbLocalAttributes attributes) { Local = local; Name = name; Attributes = attributes; } /// /// Gets/sets the local /// public Local Local { get; set; } /// /// Gets/sets the name /// public string Name { get; set; } /// /// Gets/sets the attributes /// public PdbLocalAttributes Attributes { get; set; } /// /// Gets the index of the local /// public int Index => Local.Index; /// /// true if it should be hidden in debugger variables windows. Not all compiler generated locals have this flag set. /// public bool IsDebuggerHidden { get => (Attributes & PdbLocalAttributes.DebuggerHidden) != 0; set { if (value) Attributes |= PdbLocalAttributes.DebuggerHidden; else Attributes &= ~PdbLocalAttributes.DebuggerHidden; } } /// public int HasCustomDebugInformationTag => 24; /// public bool HasCustomDebugInfos => CustomDebugInfos.Count > 0; /// /// Gets all custom debug infos /// public IList CustomDebugInfos => customDebugInfos; readonly IList customDebugInfos = new List(); } }