Code Coverage Statistics for Source File

c:\Tools\SD3\src\Libraries\ICSharpCode.TextEditor\Project\Src\Document\Selection\ColumnRange.cs

Sequence Point Coverage
N/A
0 of 0
Branch Coverage
N/A
0 of 0
Lines
66
Highlight: Uncovered Code Covered Code
L V Source
1
// <file>
2
//     <copyright see="prj:///doc/copyright.txt"/>
3
//     <license see="prj:///doc/license.txt"/>
4
//     <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
5
//     <version>$Revision: 1965 $</version>
6
// </file>
7
8
using System;
9
10
namespace ICSharpCode.TextEditor.Document
11
{
12
	public class ColumnRange 
13
	{
14
		public static readonly ColumnRange NoColumn    = new ColumnRange(-2, -2);
15
		public static readonly ColumnRange WholeColumn = new ColumnRange(-1, -1);
16
		
17
		int startColumn;
18
		int endColumn;
19
		
20
		public int StartColumn {
21
			get {
22
				return startColumn;
23
			}
24
			set {
25
				startColumn = value;
26
			}
27
		}
28
		
29
		public int EndColumn {
30
			get {
31
				return endColumn;
32
			}
33
			set {
34
				endColumn = value;
35
			}
36
		}
37
		
38
		public ColumnRange(int startColumn, int endColumn)
39
		{
40
			this.startColumn = startColumn;
41
			this.endColumn = endColumn;
42
			
43
		}
44
		
45
		public override int GetHashCode()
46
		{
47
			return startColumn + (endColumn << 16);
48
		}
49
		
50
		public override bool Equals(object obj)
51
		{
52
			if (obj is ColumnRange) {
53
				return ((ColumnRange)obj).startColumn == startColumn &&
54
				       ((ColumnRange)obj).endColumn == endColumn;
55
				
56
			}
57
			return false;
58
		}
59
		
60
		public override string ToString()
61
		{
62
			return String.Format("[ColumnRange: StartColumn={0}, EndColumn={1}]", startColumn, endColumn);
63
		}
64
		
65
	}
66
}