[longomatch/redesign3: 62/156] Add method to know if a play contains a tag.



commit 2946b51c71c70559ae78259f9e11f86f58e2895f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Jan 30 13:47:31 2011 +0100

    Add method to know if a play contains a tag.

 LongoMatch/Store/Play.cs |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch/Store/Play.cs b/LongoMatch/Store/Play.cs
index d2866c2..4c7283d 100644
--- a/LongoMatch/Store/Play.cs
+++ b/LongoMatch/Store/Play.cs
@@ -174,7 +174,13 @@ namespace LongoMatch.Store
 				Tags.Remove(tag);
 		}
 		
-		public string ToString (string team)
+		public bool HasTag(String name, object val) {
+			return  (from tag in Tags
+					where (tag.Name == (string)name) && (tag.Value == val) 
+					select tag).Count() > 0;
+		}
+		
+		public override string ToString ()
 		{
 			String[] tags = new String[Tags.Count];
 		



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