Преглед на файлове

Added ToList method to the interface IListDataSource to return the source as IList.

BDisp преди 5 години
родител
ревизия
267c2d1090
променени са 1 файла, в които са добавени 11 реда и са изтрити 0 реда
  1. 11 0
      Terminal.Gui/Views/ListView.cs

+ 11 - 0
Terminal.Gui/Views/ListView.cs

@@ -63,6 +63,12 @@ namespace Terminal.Gui {
 		/// <param name="item">Item index.</param>
 		/// <param name="value">If set to <c>true</c> value.</param>
 		void SetMark (int item, bool value);
+
+		/// <summary>
+		/// Return the source as IList.
+		/// </summary>
+		/// <returns></returns>
+		IList ToList ();
 	}
 
 	/// <summary>
@@ -574,5 +580,10 @@ namespace Terminal.Gui {
 			if (item >= 0 && item < count)
 				marks [item] = value;
 		}
+
+		public IList ToList ()
+		{
+			return src;
+		}
 	}
 }