mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-06-23 23:00:23 -07:00
turn version into a constant
This commit is contained in:
parent
8514d9a229
commit
7e5ddb2073
@ -5,6 +5,8 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
{
|
{
|
||||||
public partial class CustomDialog
|
public partial class CustomDialog
|
||||||
{
|
{
|
||||||
|
const int Version = 0;
|
||||||
|
|
||||||
private class DummyFrameworkElement : FrameworkElement { }
|
private class DummyFrameworkElement : FrameworkElement { }
|
||||||
|
|
||||||
private const int MaxElements = 100;
|
private const int MaxElements = 100;
|
||||||
@ -78,7 +80,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
if (xml.Name != "BloxstrapCustomBootstrapper")
|
if (xml.Name != "BloxstrapCustomBootstrapper")
|
||||||
throw new Exception("XML root is not a 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");
|
throw new Exception("Unknown BloxstrapCustomBootstrapper version");
|
||||||
|
|
||||||
if (xml.Descendants().Count() > MaxElements)
|
if (xml.Descendants().Count() > MaxElements)
|
||||||
|
Loading…
Reference in New Issue
Block a user