/// <summary> /// Constructor /// </summary> /// <param name="address">The address of the symbol</param> /// <param name="text">Symbol</param> /// <param name="color">Color</param> /// <param name="flags">Symbol flags</param> public SymbolResult(ulong address, string text, FormatterTextKind color, SymbolFlags flags) { Address = address; Text = new TextInfo(text, color); Flags = flags & ~SymbolFlags.HasSymbolSize; SymbolSize = MemorySize.Unknown; }
public Block(NativeCodeBlockKind kind, ulong address, string?comment, string?label, FormatterTextKind labelKind, X86InstructionInfo[] instructions) { Kind = kind; Address = address; Comment = comment; Label = label; LabelKind = labelKind; Instructions = instructions ?? throw new ArgumentNullException(nameof(instructions)); }
public static SymbolKind ToSymbolKind(FormatterTextKind kind) { switch (kind) { case FormatterTextKindExtensions.UnknownSymbol: return(SymbolKind.Unknown); case FormatterTextKind.Data: return(SymbolKind.Data); case FormatterTextKind.Label: return(SymbolKind.Label); case FormatterTextKind.Function: return(SymbolKind.Function); default: return(SymbolKind.Unknown); } }
/// <summary> /// Constructor /// </summary> /// <param name="text">Text</param> /// <param name="color">Color</param> public TextPart(string text, FormatterTextKind color) { Text = text; Color = color; }
/// <summary> /// Constructor /// </summary> /// <param name="text">Text</param> /// <param name="color">Color</param> public TextInfo(string text, FormatterTextKind color) { Text = new TextPart(text, color); TextArray = null; }
/// <summary> /// Writes text and text kind /// </summary> /// <param name="text">Text, can be an empty string</param> /// <param name="kind">Text kind. This value can be identical to the previous value passed to this method. It's /// the responsibility of the implementer to merge any such strings if needed.</param> public override void Write(string text, FormatterTextKind kind) => sb.Append(text);
/// <summary> /// Writes text and text kind /// </summary> /// <param name="text">Text</param> /// <param name="kind">Text kind</param> public abstract void Write(string text, FormatterTextKind kind);
public override void Write(string text, FormatterTextKind kind) => writer !.Write(text);
public override void Write(string text, FormatterTextKind kind) => List.Add((text, kind));