[longomatch/redesign2: 78/140] Make subcategories serializable to file



commit d29399080ee801eb7489aa5e68200acea24112de
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Mar 13 20:42:12 2011 +0100

    Make subcategories serializable to file

 LongoMatch/Store/SubCategory.cs |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch/Store/SubCategory.cs b/LongoMatch/Store/SubCategory.cs
index b734594..ad6d2ba 100644
--- a/LongoMatch/Store/SubCategory.cs
+++ b/LongoMatch/Store/SubCategory.cs
@@ -74,6 +74,14 @@ namespace LongoMatch.Store
 			get;
 			set;
 		}
+		
+		public void Save(string filePath) {
+			SerializableObject.Save(this, filePath);
+		}
+
+		public static SubCategory Load(string filePath) {
+			return SerializableObject.Load<SubCategory>(filePath);
+		}
 	}
 
 	public class TagSubCategory: SubCategory
@@ -128,5 +136,6 @@ namespace LongoMatch.Store
 			set;
 		}
 	}
+	
 }
 



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