BUGFIX: mixed upper/lowercase attribute names

This commit is contained in:
Simon Martens
2024-11-20 19:49:09 +01:00
parent a6ecafd153
commit a028bf7c6b

View File

@@ -2,20 +2,17 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using HaXMLReader.Interfaces; using HaXMLReader.Interfaces;
namespace HaXMLReader.EvArgs namespace HaXMLReader.EvArgs {
{ public class Tag : EventArgs, IReaderEvArg {
public class Tag : EventArgs, IReaderEvArg
{
public string Name { get; set; } = ""; public string Name { get; set; } = "";
public Dictionary<string, string> Values { get; set; } = new Dictionary<string, string>(); public Dictionary<string, string> Values { get; set; } = new Dictionary<string, string>();
public bool IsEmpty { get; set; } = false; public bool IsEmpty { get; set; } = false;
public bool EndTag { get; set; } = false; public bool EndTag { get; set; } = false;
// Privides safe access to the values Dict // Privides safe access to the values Dict
public string this[string key] public string this[string key] {
{ get {
get key = key.ToLower();
{
if (Values != null && Values.ContainsKey(key)) if (Values != null && Values.ContainsKey(key))
return Values[key]; return Values[key];
else else