1. Mathias Kluba
  2. SOSNet

Commits

gaut...@x61  committed bc988b4

encapsulating null check bugs fixes in SosController.types as a property

  • Participants
  • Parent commits a6f528c
  • Branches default

Comments (0)

Files changed (1)

File SosController.cs

View file
  • Ignore whitespace
     {
         private ListViewItem[] processes;
 
-        private ListViewItem[] types;
+        /// <summary>
+				/// don't use me, use SosController.types instead
+				/// </summary>
+				private ListViewItem[] _types;
 
-        private string cdbPath;
+				private ListViewItem[] types
+				{
+				  get { return _types ?? new ListViewItem[]{}; }
+				  set { _types = value; }
+				}
+
+    	private string cdbPath;
 
         private List<string> commandHistory = new List<string>();
 
 
         public ListViewItem[] FilterTypes(string typeName)
         {
-        	var typestofilterover = this.types ?? new ListViewItem[] {};
         	Func<ListViewItem, bool> filteringPredicate =
         		(item) =>
         		item.SubItems[3].Text.IndexOf(typeName, StringComparison.OrdinalIgnoreCase) != -1;
-          return typestofilterover.Where(filteringPredicate).ToArray();
+          return this.types.Where(filteringPredicate).ToArray();
         }
 
         public ObjectInfo GetInstanceDumpDetails(string instanceAddress)