Esempio n. 1
0
        //This will pull all the values from the frontend.xml file and put them into a DTO.RolloutInfo object.
        public static RolloutInfo GetFrontEndSettings()
        {
            RolloutInfo currentRollout = new RolloutInfo();
            var         doc            = GetXmlDoc.GetFrontEndXmlDoc();

            try
            {
                currentRollout.RolloutDirectory     = doc.SelectSingleNode("//RolloutDirectory").InnerText;
                currentRollout.ZipPath              = doc.SelectSingleNode("//CurrentZipPath").InnerText;
                currentRollout.LaunchFile           = doc.SelectSingleNode("//LaunchFile").InnerText;
                currentRollout.UserTypeName         = doc.SelectSingleNode("//CurrentUserType").InnerText;
                currentRollout.RolloutVersionString = doc.SelectSingleNode("//CurrentVersion").InnerText;
                currentRollout.UninstallerPath      = doc.SelectSingleNode("//UninstallerLocation").InnerText;
            }
            catch (Exception)
            {
                throw new DTO.Exceptions.FrontEndNeedsUpdateException();
            }
            return(currentRollout);
        }
Esempio n. 2
0
        //This is used when the Installer is trying to fix a broken back end. It will create a DTO.RolloutInfo object
        //from the reconstruction.xml file created during the reconstruction attempt.
        public static RolloutInfo GetReconstructedInfo(string reconstructionXmlPath)
        {
            RolloutInfo rollout = new RolloutInfo();
            var         doc     = new XmlDocument();

            doc.Load(reconstructionXmlPath);
            rollout.ZipPath = doc.SelectSingleNode("//FullZipPath").InnerText;
            rollout.RolloutVersionString = doc.SelectSingleNode("//Version").InnerText;
            rollout.UserTypeName         = doc.SelectSingleNode("//UserType").InnerText;
            rollout.DateTimeStamp        = DateTime.Parse(doc.SelectSingleNode("//DateTimeStamp").InnerText);
            rollout.LaunchFile           = doc.SelectSingleNode("//LaunchFile").InnerText;
            try
            {
                rollout.Connection.ConnectionString = doc.SelectSingleNode("//ConnectionInfo").Attributes.GetNamedItem("ConnectionString").Value;
                rollout.Connection.DateSet          = DateTime.Parse(doc.SelectSingleNode("//ConnectionInfo").Attributes.GetNamedItem("ConnectionDateSet").Value);
            }
            catch (Exception)
            {
                rollout.Connection.ConnectionString = "";
                rollout.Connection.DateSet          = null;
            }

            return(rollout);
        }
 internal static void UpdateFrontEndXml(RolloutInfo rollout)
 {
     XML.UpdateData.UpdateFrontEndXml(rollout);
 }