private void UpdateConnections(List <CrmConnectionInfo> crmConnections)
        {
            string connectionsFilePath = GetConnectionsFilePath();

            XMLSerialization xmlSerialization         = new XMLSerialization();
            string           crmConnectionsSerialized = xmlSerialization.Serialize(crmConnections);


            XmlDocument xdoc = new XmlDocument();

            xdoc.LoadXml(crmConnectionsSerialized);
            xdoc.Save(connectionsFilePath);

            // File.WriteAllText(connectionsFilePath, crmConnectionsSerialized);
        }
        public List <CrmConnectionInfo> RetrieveAvailableConnections()
        {
            List <CrmConnectionInfo> crmConnections = null;

            string connectionsFilePath = GetConnectionsFilePath();

            XMLSerialization xmlSerialization = new XMLSerialization();

            crmConnections = xmlSerialization.DeSerialize <List <CrmConnectionInfo> >(connectionsFilePath);

            if (crmConnections == null)
            {
                crmConnections = new List <CrmConnectionInfo>();
            }

            return(crmConnections);
        }