Dev2.ServerLifecycleManager.ReadBooleanSection C# (CSharp) Method

ReadBooleanSection() private method

private ReadBooleanSection ( XmlNode section, string sectionName, bool &result, bool &setter ) : bool
section System.Xml.XmlNode
sectionName string
result bool
setter bool
return bool
        internal bool ReadBooleanSection(XmlNode section, string sectionName, ref bool result, ref bool setter)
        {
            bool output = false;

            if(String.Equals(section.Name, sectionName, StringComparison.OrdinalIgnoreCase))
            {
                output = true;

                if(!String.IsNullOrEmpty(section.InnerText))
                {
                    if(String.Equals(section.InnerText, "true", StringComparison.OrdinalIgnoreCase))
                    {
                        setter = true;
                    }
                    else if(String.Equals(section.InnerText, "false", StringComparison.OrdinalIgnoreCase))
                    {
                        setter = false;
                    }
                    else
                    {
                        Fail("Configuration error, " + sectionName);
                        result = false;
                    }
                }
                else
                {
                    Fail("Configuration error, " + sectionName);
                    result = false;
                }
            }

            return output;
        }