2
0
Эх сурвалжийг харах

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

BDisp 5 жил өмнө
parent
commit
267c2d1090

+ 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;
+		}
 	}
 }