Dev2.ServerLifecycleManager.ProcessGcManager C# (CSharp) Method

ProcessGcManager() private method

private ProcessGcManager ( XmlNode section ) : bool
section System.Xml.XmlNode
return bool
        bool ProcessGcManager(XmlNode section)
        {
            XmlAttributeCollection sectionAttribs = section.Attributes;

            if(sectionAttribs != null)
            {
                foreach(XmlAttribute sAttrib in sectionAttribs)
                {
                    if(String.Equals(sAttrib.Name, "Enabled", StringComparison.OrdinalIgnoreCase))
                    {
                        _enableGcManager = String.Equals(sAttrib.Value, "True", StringComparison.OrdinalIgnoreCase);
                    }
                }
            }

            XmlNodeList allReferences = section.HasChildNodes ? section.ChildNodes : null;

            if(allReferences != null)
            {
                foreach(XmlNode current in allReferences)
                {
                    if(String.Equals(current.Name, "MinWorkingSet", StringComparison.OrdinalIgnoreCase))
                    {
                        if(!String.IsNullOrEmpty(current.InnerText))
                        {
                            long tempWorkingSet;

                            if(Int64.TryParse(current.InnerText, out tempWorkingSet))
                            {
                                _minimumWorkingSet = tempWorkingSet;
                            }
                            else
                            {
                                Fail("Configuration error, MinWorkingSet must be an integral value.");
                            }
                        }
                        else
                        {
                            Fail("Configuration error, MinWorkingSet must be given a value.");
                        }
                    }
                    else if(String.Equals(current.Name, "MaxWorkingSet", StringComparison.OrdinalIgnoreCase))
                    {
                        if(!String.IsNullOrEmpty(current.InnerText))
                        {
                            long tempWorkingSet;

                            if(Int64.TryParse(current.InnerText, out tempWorkingSet))
                            {
                            }
                            else
                            {
                                Fail("Configuration error, MaxWorkingSet must be an integral value.");
                            }
                        }
                        else
                        {
                            Fail("Configuration error, MaxWorkingSet must be given a value.");
                        }
                    }
                }
            }

            return true;
        }