Exemplo n.º 1
0
 /// <summary>
 /// Adds debug info to the custom data collection, see also <see cref="IDecompilerOutput.UsesCustomData"/>
 /// </summary>
 /// <param name="output">Output</param>
 /// <param name="methodDebugInfo">Debug info</param>
 public static void AddDebugInfo(this IDecompilerOutput output, MethodDebugInfo methodDebugInfo)
 {
     if (methodDebugInfo is null)
     {
         throw new ArgumentNullException(nameof(methodDebugInfo));
     }
     output.AddCustomData(PredefinedCustomDataIds.DebugInfo, methodDebugInfo);
 }
 public void AddCustomData <TData>(string id, TData data) => implementation.AddCustomData(id, data);
Exemplo n.º 3
0
 /// <summary>
 /// Adds a <see cref="LineSeparator"/>
 /// </summary>
 /// <param name="output">Output</param>
 /// <param name="position">Position of the line that gets a line separator</param>
 public static void AddLineSeparator(this IDecompilerOutput output, int position) =>
 output.AddCustomData(PredefinedCustomDataIds.LineSeparator, new LineSeparator(position));
Exemplo n.º 4
0
 /// <summary>
 /// Adds a <see cref="CodeBracesRange"/>
 /// </summary>
 /// <param name="output">Output</param>
 /// <param name="start">Start span</param>
 /// <param name="end">End span</param>
 /// <param name="flags">Flags</param>
 public static void AddBracePair(this IDecompilerOutput output, TextSpan start, TextSpan end, CodeBracesRangeFlags flags) =>
 output.AddCustomData(PredefinedCustomDataIds.CodeBracesRange, new CodeBracesRange(start, end, flags));
Exemplo n.º 5
0
 /// <summary>
 /// Adds a <see cref="CodeBracesRange"/>
 /// </summary>
 /// <param name="output">Output</param>
 /// <param name="range">Range</param>
 public static void AddCodeBracesRange(this IDecompilerOutput output, CodeBracesRange range) =>
 output.AddCustomData(PredefinedCustomDataIds.CodeBracesRange, range);
Exemplo n.º 6
0
 /// <summary>
 /// Adds a <see cref="SpanReference"/>
 /// </summary>
 /// <param name="output">Output</param>
 /// <param name="reference">Reference</param>
 /// <param name="start">Start position</param>
 /// <param name="end">End position</param>
 /// <param name="id">Reference id or null, eg. <see cref="PredefinedSpanReferenceIds.HighlightRelatedKeywords"/></param>
 public static void AddSpanReference(this IDecompilerOutput output, object reference, int start, int end, string?id) =>
 output.AddCustomData(PredefinedCustomDataIds.SpanReference, new SpanReference(reference, TextSpan.FromBounds(start, end), id));
Exemplo n.º 7
0
 /// <summary>
 /// Adds a <see cref="SpanReference"/>
 /// </summary>
 /// <param name="output">Output</param>
 /// <param name="spanReference">Data</param>
 public static void AddSpanReference(this IDecompilerOutput output, SpanReference spanReference) =>
 output.AddCustomData(PredefinedCustomDataIds.SpanReference, spanReference);