#588 Update to how SourceListKey gets set in EssentialsRoomBase

This commit is contained in:
Neil Dorin
2021-02-08 16:10:39 -07:00
parent 5c23aeca48
commit 2987f600bb

View File

@@ -53,18 +53,22 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
/// ///
protected string _SourceListKey; protected string _SourceListKey;
public virtual string SourceListKey { public string SourceListKey {
get get
{ {
return _SourceListKey; return _SourceListKey;
} }
set private set
{ {
_SourceListKey = value; if (value != _SourceListKey)
{
_SourceListKey = value;
}
} }
} }
protected const string _defaultSourceListKey = "default";
/// <summary> /// <summary>
/// Timer used for informing the UIs of a shutdown /// Timer used for informing the UIs of a shutdown
/// </summary> /// </summary>
@@ -160,6 +164,22 @@ namespace PepperDash.Essentials.Core
return base.CustomActivate(); return base.CustomActivate();
} }
/// <summary>
/// Sets the SourceListKey property to the passed in value or the default if no value passed in
/// </summary>
/// <param name="sourceListKey"></param>
protected void SetSourceListKey(string sourceListKey)
{
if (!string.IsNullOrEmpty(sourceListKey))
{
SourceListKey = sourceListKey;
}
else
{
sourceListKey = _defaultSourceListKey;
}
}
/// <summary> /// <summary>
/// If mobile control is enabled, sets the appropriate properties /// If mobile control is enabled, sets the appropriate properties
/// </summary> /// </summary>