From 2987f600bb8e6eebd56bb5d6063a1e1b65700234 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Mon, 8 Feb 2021 16:10:39 -0700 Subject: [PATCH] #588 Update to how SourceListKey gets set in EssentialsRoomBase --- .../Room/EssentialsRoomBase.cs | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/EssentialsRoomBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/EssentialsRoomBase.cs index 0043e3b4..cae027f5 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/EssentialsRoomBase.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/EssentialsRoomBase.cs @@ -53,18 +53,22 @@ namespace PepperDash.Essentials.Core /// /// protected string _SourceListKey; - public virtual string SourceListKey { + public string SourceListKey { get { return _SourceListKey; } - set + private set { - _SourceListKey = value; - + if (value != _SourceListKey) + { + _SourceListKey = value; + } } } + protected const string _defaultSourceListKey = "default"; + /// /// Timer used for informing the UIs of a shutdown /// @@ -160,6 +164,22 @@ namespace PepperDash.Essentials.Core return base.CustomActivate(); } + /// + /// Sets the SourceListKey property to the passed in value or the default if no value passed in + /// + /// + protected void SetSourceListKey(string sourceListKey) + { + if (!string.IsNullOrEmpty(sourceListKey)) + { + SourceListKey = sourceListKey; + } + else + { + sourceListKey = _defaultSourceListKey; + } + } + /// /// If mobile control is enabled, sets the appropriate properties ///