[longomatch/redesign: 50/96] Rework sub categories API and subclasses



commit 13d74f5320feaa0b04ff39dfbc44a321f8030574
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Jan 27 00:39:07 2011 +0100

    Rework sub categories API and subclasses

 LongoMatch/Store/SubCategory.cs |   80 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 80 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch/Store/SubCategory.cs b/LongoMatch/Store/SubCategory.cs
new file mode 100644
index 0000000..5e0b0d7
--- /dev/null
+++ b/LongoMatch/Store/SubCategory.cs
@@ -0,0 +1,80 @@
+// 
+//  Copyright (C) 2011 Andoni Morales Alastruey
+// 
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation; either version 2 of the License, or
+//  (at your option) any later version.
+// 
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//  GNU General Public License for more details.
+//  
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+// 
+using System;
+using System.Collections.Generic;
+using LongoMatch.Common;
+
+namespace LongoMatch.Store
+{
+	public class SubCategory
+	{
+		public SubCategory (){
+			Options = new List<object>();
+		}
+		
+		/// <summary>
+		/// Name of the subcategory
+		/// </summary>
+		public String Name {
+			get;
+			set;
+		}
+		
+		public List<object> Options {
+			get;
+			set;
+		}
+	}
+	
+	public class TagSubCategory: SubCategory
+	{
+		public TagSubCategory (){
+			Options = new List<string>();
+		}
+		
+		public new List<string> Options {
+			get;
+			set;
+		}
+	}
+	
+	public class PlayerSubCategory: SubCategory
+	{
+		public PlayerSubCategory (){
+			Options = new List<Team>();
+		}
+		
+		public new List<Team> Options {
+			get;
+			set;
+		}
+	}
+	
+	public class TeamSubCategory: SubCategory
+	{
+		public TeamSubCategory (){
+			Options = new List<Team>();
+		}
+		
+		public new List<Team> Options {
+			get;
+			set;
+		}
+	}
+}
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]