[longomatch/redesign2: 12/17] Add constructor with IEnumerable
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/redesign2: 12/17] Add constructor with IEnumerable
- Date: Wed, 27 Apr 2011 20:43:05 +0000 (UTC)
commit 77e93def82a0ffb913c85ff4c9157bfdac4971be
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Apr 27 22:17:21 2011 +0200
Add constructor with IEnumerable
LongoMatch/Store/SubCategory.cs | 9 +++++++--
LongoMatch/Store/Templates/SubCategoryTemplate.cs | 2 ++
2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch/Store/SubCategory.cs b/LongoMatch/Store/SubCategory.cs
index cddf8bd..2e34d66 100644
--- a/LongoMatch/Store/SubCategory.cs
+++ b/LongoMatch/Store/SubCategory.cs
@@ -41,8 +41,9 @@ namespace LongoMatch.Store
[Serializable]
public class SubCategory<T>: List<T>, ISubCategory
{
- public SubCategory() {
- }
+ public SubCategory() {}
+
+ public SubCategory(IEnumerable<T> list): base(list) {}
/// <summary>
/// Name of the subcategory
@@ -87,6 +88,10 @@ namespace LongoMatch.Store
[Serializable]
public class TagSubCategory: SubCategory<string> {
+ public TagSubCategory () {}
+
+ public TagSubCategory (IEnumerable<string> tags): base(tags) {}
+
public override string ToMarkupString(){
string tags = "";
diff --git a/LongoMatch/Store/Templates/SubCategoryTemplate.cs b/LongoMatch/Store/Templates/SubCategoryTemplate.cs
index 359addd..ac24a0d 100644
--- a/LongoMatch/Store/Templates/SubCategoryTemplate.cs
+++ b/LongoMatch/Store/Templates/SubCategoryTemplate.cs
@@ -31,6 +31,8 @@ namespace LongoMatch.Store.Templates
public SubCategoryTemplate() {}
+ public SubCategoryTemplate(IEnumerable<string> tags): base (tags) {}
+
public void Save(string filePath) {
SerializableObject.Save(this, filePath);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]