[longomatch/redesign: 63/82] Add method to know if a play contains a tag.



commit d59f4bc9546cebe48639818f388d5949cc9b5d3a
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]