[longomatch/redesign2: 83/140] Add interface to handle Templates with generics



commit 2bdc371767eef80383cdaa696c7805389269cfa5
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sat Mar 26 19:49:10 2011 +0100

    Add interface to handle Templates with generics

 LongoMatch/Interfaces/ITemplates.cs |   51 +++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch/Interfaces/ITemplates.cs b/LongoMatch/Interfaces/ITemplates.cs
new file mode 100644
index 0000000..cffdb34
--- /dev/null
+++ b/LongoMatch/Interfaces/ITemplates.cs
@@ -0,0 +1,51 @@
+// 
+//  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;
+	
+namespace LongoMatch.Interfaces
+{
+	public interface ITemplate
+	{
+		void Save (string filename);
+		string Name {get;}
+	}
+	
+	public interface ITemplateProvider
+	{
+		void CheckDefaultTemplate();
+		string[] TemplatesNames {get;}
+		bool Exists(string name);
+		void Copy (string orig, string copy);
+		void Delete (string templateName);
+		void Create (string templateName, params object [] list);
+	}
+	
+	public interface ITemplateProvider<T>: ITemplateProvider where T: ITemplate
+	{
+		List<T> Templates {get;}
+		T Load (string name);
+		void Save (ITemplate template);
+	}
+	
+	public interface ITemplateWidget<T>
+	{
+		T Template {get; set;}
+	}
+}
+



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