Files
MBN_STOCK_WEBVIEW/src/MBN_STOCK_WEBVIEW.Playout/Safety/LiveAuthorization.cs

19 lines
527 B
C#

namespace MBN_STOCK_WEBVIEW.Playout.Safety;
internal interface ILiveAuthorization
{
bool IsAuthorizedForThisLaunch { get; }
}
internal sealed class EnvironmentLiveAuthorization : ILiveAuthorization
{
public EnvironmentLiveAuthorization()
{
// Capture once. Changing a process environment variable after launch cannot arm output.
IsAuthorizedForThisLaunch =
Configuration.PlayoutOptionsLoader.IsLiveAuthorizedForThisLaunch();
}
public bool IsAuthorizedForThisLaunch { get; }
}