summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-07-03 01:22:53 +0200
committeremkael <emkael@tlen.pl>2019-07-03 01:22:53 +0200
commit39ab3c602a1d23eda05f0ac4f500c6f58a595fda (patch)
tree80f0219f1dd3da245c0c31d06d592eba551eaff8 /src
parent31dca0a387524e811cbe99613e6a58ea48c6ba58 (diff)
Fetching PBN fields raw objects by tag name
Diffstat (limited to 'src')
-rw-r--r--src/PBNBoard.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/PBNBoard.cs b/src/PBNBoard.cs
index 7578fbe..5323575 100644
--- a/src/PBNBoard.cs
+++ b/src/PBNBoard.cs
@@ -72,18 +72,23 @@ namespace BCDD
return false;
}
- public String GetField(String key)
+ public PBNField GetFieldObject(String key)
{
foreach (PBNField field in this.Fields)
{
if (key.Equals(field.Key))
{
- return field.Value;
+ return field;
}
}
throw new FieldNotFoundException(key + " field not found");
}
+ public String GetField(String key)
+ {
+ return this.GetFieldObject(key).Value;
+ }
+
public void DeleteField(String key)
{
List<PBNField> toRemove = new List<PBNField>();