Skip to content

Commit

Permalink
turn version into a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepilledgreat committed Jan 21, 2025
1 parent 8514d9a commit 7e5ddb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -78,7 +80,7 @@ private void HandleXmlBase(XElement xml)
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)
Expand Down

0 comments on commit 7e5ddb2

Please sign in to comment.