[longomatch/redesign2: 62/140] Add method to know if a play contains a tag.
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/redesign2: 62/140] Add method to know if a play contains a tag.
- Date: Tue, 24 May 2011 22:01:19 +0000 (UTC)
commit 53bbf0fc1e4e133361c72943164e61a02247f27d
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]