A4LGSharedFunctions.ConfigUtil.GetLinePointAtEndsConfig C# (CSharp) Method

GetLinePointAtEndsConfig() public static method

public static GetLinePointAtEndsConfig ( ) : List
return List
        public static List<ConstructLineWithPointsDetails> GetLinePointAtEndsConfig()
        {
            XmlDocument xmld = getConfigAsXMLDoc();
            if (xmld == null) return null;
            XmlNodeList nodelist = null;
            XmlNode node = null;
            List<ConstructLineWithPointsDetails> pEntries = null;
            ConstructLineWithPointsDetails pSingleEntries = null;
            try
            {

                //Get the list of name nodes
                //nodelist = xmld.SelectNodes("LayerViewerConfig/Layers/Layer");
                nodelist = xmld.SelectNodes("configuration/ConstructLineWithPoints/ConstructLineWithPointsDetails");
                if (nodelist == null) { return null; }
                //Loop through the nodes
                pEntries = new List<ConstructLineWithPointsDetails>();

                for (int i = 0; i < nodelist.Count; i++)
                {
                    node = nodelist.Item(i);
                    pSingleEntries = ((ConstructLineWithPointsDetails)Globals.DeserializeObject(node, typeof(ConstructLineWithPointsDetails)));
                    if (pSingleEntries != null)

                        pEntries.Add(pSingleEntries);
                }

                return pEntries;
            }
            catch //(Exception ex)
            {

                return null;

            }
            finally
            {

                xmld = null;
                nodelist = null;
                node = null;

                pSingleEntries = null;
            }
        }