private static void AddDefaultValueIfKnown(List <object> environmentValuesMapping, ConfigurationParameter parameter) { if (!ConfigurationParameter.IsValueUnknown(parameter.DefaultValue)) { environmentValuesMapping.Add(new Dictionary <string, string> { { "default", parameter.DefaultValue } }); } }
private static bool IsEnvironmentValueSameAsDefault( ConfigurationParameter parameter, ConfigurableEnvironment environment, out string environmentValue) { var isEnvironmentValueDefined = parameter.Values.TryGetValue(environment, out environmentValue); if (!isEnvironmentValueDefined && ConfigurationParameter.IsValueUnknown(parameter.DefaultValue) || isEnvironmentValueDefined && ((ConfigurationParameter.IsValueUnknown(environmentValue) && ConfigurationParameter.IsValueUnknown(parameter.DefaultValue)) || environmentValue == parameter.DefaultValue)) { return(true); } return(false); }
private static bool AreAllParamValuesUnknownAndDefaultValueIsAlsoUnknown( ConfigurationParameter parameter) { return(parameter.Values.All(v => ConfigurationParameter.IsValueUnknown(v.Value)) && ConfigurationParameter.IsValueUnknown(parameter.DefaultValue)); }