BlogTalkRadio.Tools.CFT.ConfigurationNameResolver.GetConfigurationName C# (CSharp) Method

GetConfigurationName() public method

public GetConfigurationName ( string &choice ) : string
choice string
return string
        public string GetConfigurationName(out string choice)
        {
            string name;
            if (!string.IsNullOrWhiteSpace(Filename) && File.Exists(Filename))
            {
                name = File.ReadLines(Filename).FirstOrDefault();
                if (!string.IsNullOrWhiteSpace(name))
                {
                    choice = "file " + Filename;
                    return name;
                }
            }
            if (!string.IsNullOrWhiteSpace(EnvironmentVariable))
            {
                name = Environment.GetEnvironmentVariable(EnvironmentVariable);
                if (!string.IsNullOrWhiteSpace(name))
                {
                    choice = "environment variable " + EnvironmentVariable;
                    return name;
                }
            }
            choice = "default value";
            return Default;
        }
ConfigurationNameResolver