Adds a flag to the debug context class to save whether or not an application should start after the next boot.

This commit is contained in:
Neil Dorin
2019-11-15 12:57:31 -07:00
parent 3f00f92e49
commit acf9514fc5
2 changed files with 21 additions and 0 deletions

View File

@@ -237,6 +237,18 @@ namespace PepperDash.Core
}
}
/// <summary>
/// Sets the flag to prevent application starting on next boot
/// </summary>
/// <param name="state"></param>
public static void SetDoNotStartOnNextBoot(bool state)
{
Contexts.DoNotStartOnNextBoot = state;
CrestronConsole.PrintLine("[Application {0}], Do Not Start on Next Boot set to {1}",
InitialParametersClass.ApplicationNumber, Contexts.DoNotStartOnNextBoot);
SaveMemoryOnTimeout();
}
/// <summary>
///
/// </summary>

View File

@@ -10,6 +10,12 @@ namespace PepperDash.Core.DebugThings
{
public class DebugContextCollection
{
/// <summary>
/// Property to tell the program not to intitialize when it boots, if desired
/// </summary>
[JsonProperty("doNotStartOnNextBoot")]
public bool DoNotStartOnNextBoot { get; set; }
[JsonProperty("items")]
Dictionary<string, DebugContextItem> Items;
@@ -47,6 +53,9 @@ namespace PepperDash.Core.DebugThings
public class DebugContextItem
{
/// <summary>
/// The level of debug messages to print
/// </summary>
[JsonProperty("level")]
public int Level { get; set; }