From 39ab3c602a1d23eda05f0ac4f500c6f58a595fda Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 3 Jul 2019 01:22:53 +0200 Subject: Fetching PBN fields raw objects by tag name --- src/PBNBoard.cs | 9 +++++++-- 1 file 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 toRemove = new List(); -- cgit v1.2.3