Config validation and subsequent load working. Need to look into exceptions thrown by several devices when deserializing control properties.

This commit is contained in:
Neil Dorin
2020-01-21 17:39:57 -07:00
parent bd7831146d
commit 740c944f54
8 changed files with 142 additions and 11 deletions

View File

@@ -9,8 +9,14 @@ using PepperDash.Essentials.License;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Global application properties
/// </summary>
public static class Global
{
/// <summary>
/// The control system the application is running on
/// </summary>
public static CrestronControlSystem ControlSystem { get; set; }
public static LicenseManager LicenseManager { get; set; }
@@ -31,6 +37,19 @@ namespace PepperDash.Essentials.Core
}
}
/// <summary>
/// The file path prefix to the folder containing the application files (including embedded resources)
/// </summary>
public static string ApplicationDirectoryPrefix
{
get
{
string fmt = "00.##";
var appNumber = InitialParametersClass.ApplicationNumber.ToString(fmt);
return string.Format("{0}{1}Simpl{1}app{2}{1}", Crestron.SimplSharp.CrestronIO.Directory.GetApplicationRootDirectory(), Global.DirectorySeparator,appNumber );
}
}
/// <summary>
/// Wildcarded config file name for global reference
/// </summary>