[longomatch/redesign] 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/redesign] Add method to know if a play contains a tag.
- Date: Mon, 31 Jan 2011 19:55:11 +0000 (UTC)
commit 31d2a54a284fad872ce368c4a0b2ccc81f719cae
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]