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



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