mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-03 18:48:40 +00:00
Fix unreachable code warnings
This commit is contained in:
parent
46a5b62f68
commit
ea5f216b1f
3 changed files with 11 additions and 12 deletions
|
@ -144,9 +144,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</noscript>
|
</noscript>
|
||||||
@* ReSharper disable HeuristicUnreachableCode *@
|
@if (!ServerStatics.IsDebug() && VersionHelper.IsDirty)
|
||||||
@* ReSharper disable CSharpWarnings::CS0162 *@
|
|
||||||
@if (!ServerStatics.IsDebug && VersionHelper.IsDirty)
|
|
||||||
{
|
{
|
||||||
<div class="ui bottom attached red message large">
|
<div class="ui bottom attached red message large">
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
|
@ -166,8 +164,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@* ReSharper restore CSharpWarnings::CS0162 *@
|
|
||||||
@* ReSharper restore HeuristicUnreachableCode *@
|
|
||||||
</header>
|
</header>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
|
@ -197,7 +193,7 @@
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if (ServerStatics.IsDebug)
|
@if (ServerStatics.IsDebug())
|
||||||
{
|
{
|
||||||
<div class="ui red attached inverted segment">
|
<div class="ui red attached inverted segment">
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
@if (ServerStatics.IsDebug)
|
@if (ServerStatics.IsDebug())
|
||||||
{
|
{
|
||||||
<button class="ui red button" onclick="fill()">DEBUG: Fill with everything but email</button>
|
<button class="ui red button" onclick="fill()">DEBUG: Fill with everything but email</button>
|
||||||
|
|
||||||
|
|
|
@ -27,11 +27,14 @@ public static class ServerStatics
|
||||||
// FIXME: This needs to go at some point.
|
// FIXME: This needs to go at some point.
|
||||||
public static bool IsUnitTesting => AppDomain.CurrentDomain.GetAssemblies().Any(assembly => assembly.FullName!.StartsWith("xunit"));
|
public static bool IsUnitTesting => AppDomain.CurrentDomain.GetAssemblies().Any(assembly => assembly.FullName!.StartsWith("xunit"));
|
||||||
|
|
||||||
|
public static bool IsDebug()
|
||||||
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
public const bool IsDebug = true;
|
return true;
|
||||||
#else
|
#else
|
||||||
public const bool IsDebug = false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The servertype, determined on startup. Shouldn't be null unless very very early in startup.
|
/// The servertype, determined on startup. Shouldn't be null unless very very early in startup.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue