[longomatch] Add method to list elements in subcategories
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add method to list elements in subcategories
- Date: Sun, 18 Dec 2011 21:43:56 +0000 (UTC)
commit 5f6185ea80c0ca7f10bf7c19e96c71fde094f297
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Dec 16 02:42:55 2011 +0100
Add method to list elements in subcategories
LongoMatch.Core/Interfaces/ISubCategory.cs | 3 +++
LongoMatch.Core/Store/SubCategory.cs | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Core/Interfaces/ISubCategory.cs b/LongoMatch.Core/Interfaces/ISubCategory.cs
index b78486e..15ffd16 100644
--- a/LongoMatch.Core/Interfaces/ISubCategory.cs
+++ b/LongoMatch.Core/Interfaces/ISubCategory.cs
@@ -16,6 +16,8 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
using System;
+using System.Collections.Generic;
+
namespace LongoMatch.Interfaces
{
public interface ISubCategory
@@ -28,6 +30,7 @@ namespace LongoMatch.Interfaces
string ToMarkupString();
+ List<string> ElementsDesc ();
}
}
diff --git a/LongoMatch.Core/Store/SubCategory.cs b/LongoMatch.Core/Store/SubCategory.cs
index 495fbcb..b9f6dce 100644
--- a/LongoMatch.Core/Store/SubCategory.cs
+++ b/LongoMatch.Core/Store/SubCategory.cs
@@ -17,6 +17,7 @@
//
using System;
using System.Collections.Generic;
+using System.Linq;
using Mono.Unix;
using LongoMatch.Common;
@@ -89,6 +90,9 @@ namespace LongoMatch.Store
return this.ToString();
}
+ public List<string> ElementsDesc () {
+ return this.Select(e => e.ToString()).ToList();
+ }
}
[Serializable]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]