Beispiel #1
0
        /// <summary>Constructor</summary>
        /// <param name="xml">Job specification xml.</param>
        /// <param name="environment">The runtime environment to use for the run</param>
        public RunF4PJob(string xml, RuntimeEnvironment environment)
        {
            // Save f4p.xml to working folder.
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(xml);
            doc.Save(Path.Combine(workingDirectory, "f4p.xml"));

            Farm4Prophet spec = Farm4ProphetUtility.Farm4ProphetFromXML(xml);

            Initialise(spec, environment);
        }
Beispiel #2
0
        /// <summary>Constructor</summary>
        /// <param name="xml">Job specification xml.</param>
        /// <param name="environment">The runtime environment to use for the run</param>
        public RunF4PJob(string xml, RuntimeEnvironment environment)
        {
            workingDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
            Directory.CreateDirectory(workingDirectory);

            // Save f4p.xml to working folder.
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(xml);
            doc.Save(Path.Combine(workingDirectory, "f4p.xml"));

            Farm4Prophet spec = Farm4ProphetUtility.Farm4ProphetFromXML(xml);

            Initialise(spec, environment);
        }