ILVisualizerAsTokens.cs 783 B

123456789101112131415161718192021222324
  1. // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
  2. namespace AtomicEditor
  3. {
  4. public sealed class ILVisualizerAsTokens : ILVisualizer
  5. {
  6. public static readonly ILVisualizerAsTokens Instance = new ILVisualizerAsTokens();
  7. public override string VisualizeUserString(uint token)
  8. {
  9. return string.Format("0x{0:X8}", token);
  10. }
  11. public override string VisualizeSymbol(uint token)
  12. {
  13. return string.Format("0x{0:X8}", token);
  14. }
  15. public override string VisualizeLocalType(object type)
  16. {
  17. return string.Format("0x{0:X8}", type); // Should be a token.
  18. }
  19. }
  20. }