PageRenderTime 32ms CodeModel.GetById 0ms 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
Possible License(s): CC-BY-SA-3.0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Microsoft.Research.DynamicDataDisplay.Common.DataSearch
  6. {
  7. internal struct SearchResult1d
  8. {
  9. public static SearchResult1d Empty
  10. {
  11. get { return new SearchResult1d { Index = -1 }; }
  12. }
  13. public int Index { get; internal set; }
  14. public bool IsEmpty
  15. {
  16. get { return Index == -1; }
  17. }
  18. public override string ToString()
  19. {
  20. if (IsEmpty)
  21. return "Empty";
  22. return String.Format("Index = {0}", Index);
  23. }
  24. }
  25. }