Added way to add Tags from KeyValuePair
This commit is contained in:
parent
090981fb99
commit
6a2ddf3277
@ -33,6 +33,13 @@ public class TagManager
|
||||
}
|
||||
}
|
||||
|
||||
public void AddTag(ulong wayId, KeyValuePair<Tag.TagType, dynamic> keyValuePair)
|
||||
{
|
||||
if(!wayTags.ContainsKey(wayId))
|
||||
wayTags.Add(wayId, new HashSet<Tag>());
|
||||
wayTags[wayId].Add(new Tag(keyValuePair.Key, keyValuePair.Value));
|
||||
}
|
||||
|
||||
public HashSet<Tag>? GetTagsForWayId(ulong wayId)
|
||||
{
|
||||
return wayTags.TryGetValue(wayId, out HashSet<Tag>? value) ? value : null;
|
||||
|
Loading…
Reference in New Issue
Block a user