From 267c2d1090832e4130e485d5d343db1542e5bbab Mon Sep 17 00:00:00 2001 From: BDisp Date: Mon, 18 May 2020 13:59:24 +0100 Subject: [PATCH] Added ToList method to the interface IListDataSource to return the source as IList. --- Terminal.Gui/Views/ListView.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Terminal.Gui/Views/ListView.cs b/Terminal.Gui/Views/ListView.cs index 309c408e0..467d02267 100644 --- a/Terminal.Gui/Views/ListView.cs +++ b/Terminal.Gui/Views/ListView.cs @@ -63,6 +63,12 @@ namespace Terminal.Gui { /// Item index. /// If set to true value. void SetMark (int item, bool value); + + /// + /// Return the source as IList. + /// + /// + IList ToList (); } /// @@ -574,5 +580,10 @@ namespace Terminal.Gui { if (item >= 0 && item < count) marks [item] = value; } + + public IList ToList () + { + return src; + } } }