[longomatch/redesign3: 124/156] Add constructor with IEnumerable



commit 93570ecca667190cb31711da3f8a02b54dc7fb9d
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]