Ported libs fo net V6

This commit is contained in:
schnulller
2022-05-17 01:21:10 +02:00
parent cb23a75761
commit 2ffd46cd62
79 changed files with 225299 additions and 124 deletions

View File

@@ -0,0 +1,16 @@
using HaXMLReader.EvArgs;
using System.Linq;
namespace HaDocument {
static class Helpers {
internal static string GetElementString(Tag tag) {
var res = "<" + (tag.EndTag ? "/" : "") + tag.Name.ToLower();
if (!tag.EndTag && tag.Values != null && tag.Values.Any()) {
foreach (var kvp in tag.Values) {
res += " " + kvp.Key.ToLower() + "=\"" + kvp.Value.ToLower() + "\"";
}
}
return res + (tag.IsEmpty ? "/" : "") + ">";
}
}
}