PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/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
11using System;
12
13namespace Mono.Cecil.Cil {
14
15	public sealed class SequencePoint {
16
17		internal InstructionOffset offset;
18		Document document;
19
20		int start_line;
21		int start_column;
22		int end_line;
23		int end_column;
24
25		public int Offset {
26			get { return offset.Offset; }
27		}
28
29		public int StartLine {
30			get { return start_line; }
31			set { start_line = value; }
32		}
33
34		public int StartColumn {
35			get { return start_column; }
36			set { start_column = value; }
37		}
38
39		public int EndLine {
40			get { return end_line; }
41			set { end_line = value; }
42		}
43
44		public int EndColumn {
45			get { return end_column; }
46			set { end_column = value; }
47		}
48
49		public bool IsHidden {
50			get { return start_line == 0xfeefee && start_line == end_line; }
51		}
52
53		public Document Document {
54			get { return document; }
55			set { document = value; }
56		}
57
58		internal SequencePoint (int offset, Document document)
59		{
60			if (document == null)
61				throw new ArgumentNullException ("document");
62
63			this.offset = new InstructionOffset (offset);
64			this.document = document;
65		}
66
67		public SequencePoint (Instruction instruction, Document document)
68		{
69			if (document == null)
70				throw new ArgumentNullException ("document");
71
72			this.offset = new InstructionOffset (instruction);
73			this.document = document;
74		}
75	}
76}