A4LGSharedFunctions.ConfigUtil.GetCreatePointWithRefConfig C# (CSharp) Method

GetCreatePointWithRefConfig() public static method

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

                //Get the list of name nodes
                //nodelist = xmld.SelectNodes("LayerViewerConfig/Layers/Layer");

                nodelist = xmld.SelectNodes("configuration/AddressManagement/CreatePointWithReference/CreatePointWithReferenceDetails");
                if (nodelist == null) { return null; }
                //Loop through the nodes
                pEntries = new List<CreatePointWithReferenceDetails>();

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

                        pEntries.Add(pSingleEntries);
                }

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

                return null;

            }
            finally
            {

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

                pSingleEntries = null;
            }
        }