OCISDK/OCISDK/Common/ConfigFileReader.cs
/// <summary>
/// Creates a new ConfigFile instance using the configuration at the default location,
/// using the given profile.
/// </summary>
/// <param name="profile"></param>
/// <returns></returns>
Creates a new ConfigFile instance using the configuration at the default location,
using the given profile.
Creates a new ConfigFile instance using the configuration at the default location using the given profile .
public static ConfigFile ParseDefault(string profile)
        {
            string effectiveFile = null;
            if (File.Exists(DEFAULT_FILE_PATH)) {
                effectiveFile = DEFAULT_FILE_PATH;
            } else if (File.Exists(FALLBACK_DEFAULT_FILE_PATH)) {
                effectiveFile = FALLBACK_DEFAULT_FILE_PATH;
            }
            if (effectiveFile != null) {
                Console.WriteLine($"Loading config file from: {effectiveFile}");
                return Parse(effectiveFile, profile);
            } else {
                throw new Exception(
                    $"Can't load the default config from " +
                    $"{DEFAULT_FILE_PATH} or " +
                    $"{FALLBACK_DEFAULT_FILE_PATH} because it does not exist or it is not a file.");
            }
        }
public static ConfigFile ParseDefault ( string profile ) { string effectiveFile = null ; if ( File . Exists ( DEFAULT_FILE_PATH ) ) { effectiveFile = DEFAULT_FILE_PATH ; } else if ( File . Exists ( FALLBACK_DEFAULT_FILE_PATH ) ) { effectiveFile = FALLBACK_DEFAULT_FILE_PATH ; } if ( effectiveFile != null ) { Console . WriteLine ( $" Loading config file from:  { effectiveFile } " ) ; return Parse ( effectiveFile , profile ) ; } else { throw new Exception ( $" Can't load the default config from  " + $" { DEFAULT_FILE_PATH }  or  " + $" { FALLBACK_DEFAULT_FILE_PATH }  because it does not exist or it is not a file. " ) ; } }
Creates a new ConfigFile instance using the configuration at the default location,
using the given profile.
Creates a new ConfigFile instance using the configuration at the default location using the given profile .
//LOG.debug("Loading config file from: {}", effectiveFile);
None
profile
string
None