From 7e5ddb2073c9685fb5ed799c94af34cf7723df21 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Tue, 21 Jan 2025 23:08:59 +0000 Subject: [PATCH] turn version into a constant --- Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs index 70f8d30..6f131e8 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs @@ -5,6 +5,8 @@ namespace Bloxstrap.UI.Elements.Bootstrapper { public partial class CustomDialog { + const int Version = 0; + private class DummyFrameworkElement : FrameworkElement { } private const int MaxElements = 100; @@ -78,7 +80,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper if (xml.Name != "BloxstrapCustomBootstrapper") throw new Exception("XML root is not a BloxstrapCustomBootstrapper"); - if (xml.Attribute("Version")?.Value != "0") + if (xml.Attribute("Version")?.Value != Version.ToString()) throw new Exception("Unknown BloxstrapCustomBootstrapper version"); if (xml.Descendants().Count() > MaxElements)