public static void ThrowIfKeyNotExists(this BuildMonitorSettings settings, String key)
{
if (settings == null)
{
throw new ArgumentNullException(nameof(settings));
}
if (String.IsNullOrWhiteSpace(key))
{
throw new ArgumentNullException(nameof(key));
}
if (!settings.ContainsKey(key))
{
throw new KeyNotFoundException($"Required key {key} not found in settings!");
}
}