21 private static readonly Dictionary<string, ThemeDefinition> definitionsPerDomain =
new Dictionary<string, ThemeDefinition>(StringComparer.InvariantCultureIgnoreCase);
53 if (!
string.IsNullOrEmpty(Host))
79 if (!
string.IsNullOrEmpty(Host))
91 get => currentDefinition;
92 internal set => currentDefinition = value;
102 lock (definitionsPerDomain)
108 return currentDefinition;
118 lock (definitionsPerDomain)
124 private static string ColorToString(SKColor Color)
126 StringBuilder sb =
new StringBuilder();
129 sb.Append(Color.Red.ToString(
"X2"));
130 sb.Append(Color.Green.ToString(
"X2"));
131 sb.Append(Color.Blue.ToString(
"X2"));
133 if (Color.Alpha != 255)
134 sb.Append(Color.Alpha.ToString(
"X2"));
136 return sb.ToString();
Domain constant, contains the value of the gateway domain.
string ConstantName
Name of the constant
IElement GetValueElement(Variables Variables)
Gets the constant value element.
static ThemeDefinition GetCurrentTheme(SessionVariables Variables)
Gets the current theme definition, based on the host information available in the session varaibles.
static ThemeDefinition CurrentTheme
Current theme.
static ThemeDefinition GetTheme(string Domain)
Gets the theme for a given domain.
string[] Aliases
Optional aliases. If there are no aliases for the constant, null is returned.
Contains properties for a theme.
SKColor GraphFgColor
Graph foreground color.
SKColor GraphBgColor
Graph background color.
Collection of session variables.
HttpRequest CurrentRequest
Reference to current request.
const string GraphFgColorVariableName
Variable name for graph foreground color.
const string GraphBgColorVariableName
Variable name for graph background color.
Interface for objects that contain a reference to a host.
Basic interface for all types of elements.
Base interface for constants that integrate into the script engine.