mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-28 03:45:01 +00:00
60 lines
1.5 KiB
C#
60 lines
1.5 KiB
C#
using Crestron.SimplSharp;
|
|
using Crestron.SimplSharp.CrestronDataStore;
|
|
using Crestron.SimplSharpPro;
|
|
|
|
//using PepperDash.Essentials.Core.Http;
|
|
using PepperDash.Essentials.License;
|
|
|
|
|
|
|
|
namespace PepperDash.Essentials.Core
|
|
{
|
|
public static class Global
|
|
{
|
|
public static CrestronControlSystem ControlSystem { get; set; }
|
|
|
|
public static LicenseManager LicenseManager { get; set; }
|
|
|
|
/// <summary>
|
|
/// The file path prefix to the folder containing configuration files
|
|
/// </summary>
|
|
public static string FilePathPrefix { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Returns the directory separator character based on the running OS
|
|
/// </summary>
|
|
public static char DirectorySeparator
|
|
{
|
|
get
|
|
{
|
|
return System.IO.Path.DirectorySeparatorChar;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Wildcarded config file name for global reference
|
|
/// </summary>
|
|
public const string ConfigFileName = "*configurationFile*.json";
|
|
|
|
/// <summary>
|
|
/// Sets the file path prefix
|
|
/// </summary>
|
|
/// <param name="prefix"></param>
|
|
public static void SetFilePathPrefix(string prefix)
|
|
{
|
|
FilePathPrefix = prefix;
|
|
}
|
|
|
|
static Global()
|
|
{
|
|
// Fire up CrestronDataStoreStatic
|
|
var err = CrestronDataStoreStatic.InitCrestronDataStore();
|
|
if (err != CrestronDataStore.CDS_ERROR.CDS_SUCCESS)
|
|
{
|
|
CrestronConsole.PrintLine("Error starting CrestronDataStoreStatic: {0}", err);
|
|
return;
|
|
}
|
|
}
|
|
|
|
}
|
|
} |