PageRenderTime 24ms CodeModel.GetById 16ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Main/src/DynamicDataDisplay/Common/Auxiliary/DataSearch/SearchResult1d.cs

#
C# | 30 lines | 25 code | 5 blank | 0 comment | 2 complexity | e1bbdb8cbfaf29233f25073d3f394b69 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Text;
 5
 6namespace Microsoft.Research.DynamicDataDisplay.Common.DataSearch
 7{
 8	internal struct SearchResult1d
 9	{
10		public static SearchResult1d Empty
11		{
12			get { return new SearchResult1d { Index = -1 }; }
13		}
14
15		public int Index { get; internal set; }
16
17		public bool IsEmpty
18		{
19			get { return Index == -1; }
20		}
21
22		public override string ToString()
23		{
24			if (IsEmpty)
25				return "Empty";
26
27			return String.Format("Index = {0}", Index);
28		}
29	}
30}