[longomatch/redesign: 79/96] Make subcategories serializable to file



commit 5250bccdf9471f00967a629f18da2552d92f9b43
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]