/Mono.Cecil.Cil/SequencePoint.cs

http://github.com/jbevain/cecil · C# · 76 lines · 51 code · 16 blank · 9 comment · 7 complexity · 6d3edccb82d6252d120702b4233552f1 MD5 · raw file

  1. //
  2. // Author:
  3. // Jb Evain (jbevain@gmail.com)
  4. //
  5. // Copyright (c) 2008 - 2015 Jb Evain
  6. // Copyright (c) 2008 - 2011 Novell, Inc.
  7. //
  8. // Licensed under the MIT/X11 license.
  9. //
  10. using System;
  11. namespace Mono.Cecil.Cil {
  12. public sealed class SequencePoint {
  13. internal InstructionOffset offset;
  14. Document document;
  15. int start_line;
  16. int start_column;
  17. int end_line;
  18. int end_column;
  19. public int Offset {
  20. get { return offset.Offset; }
  21. }
  22. public int StartLine {
  23. get { return start_line; }
  24. set { start_line = value; }
  25. }
  26. public int StartColumn {
  27. get { return start_column; }
  28. set { start_column = value; }
  29. }
  30. public int EndLine {
  31. get { return end_line; }
  32. set { end_line = value; }
  33. }
  34. public int EndColumn {
  35. get { return end_column; }
  36. set { end_column = value; }
  37. }
  38. public bool IsHidden {
  39. get { return start_line == 0xfeefee && start_line == end_line; }
  40. }
  41. public Document Document {
  42. get { return document; }
  43. set { document = value; }
  44. }
  45. internal SequencePoint (int offset, Document document)
  46. {
  47. if (document == null)
  48. throw new ArgumentNullException ("document");
  49. this.offset = new InstructionOffset (offset);
  50. this.document = document;
  51. }
  52. public SequencePoint (Instruction instruction, Document document)
  53. {
  54. if (document == null)
  55. throw new ArgumentNullException ("document");
  56. this.offset = new InstructionOffset (instruction);
  57. this.document = document;
  58. }
  59. }
  60. }