Esempio n. 1
0
 internal static void ApplyDeployments(Collection <string> deployments, DirectoryInfo testBinariesDirectory)
 {
     if (deployments != null)
     {
         foreach (string deployment in deployments)
         {
             ExecutionEventLog.RecordStatus("Applying Deployment: " + deployment);
             StateCollection stateCollection = LoadStateCollection(deployment, testBinariesDirectory);
             stateCollection.Push(StatePool.Execution);
         }
     }
 }
Esempio n. 2
0
        internal static StateCollection LoadStateCollection(string deployment, DirectoryInfo testBinariesDirectory)
        {
            FileInfo        fileInfo        = new FileInfo(Path.Combine(testBinariesDirectory.FullName, deployment));
            StateCollection stateCollection = null;

            using (XmlTextReader textReader = new XmlTextReader(fileInfo.OpenRead()))
            {
                stateCollection = (StateCollection)ObjectSerializer.Deserialize(textReader, typeof(StateCollection), null);
            }
            foreach (StateModule module in stateCollection)
            {
                module.TestBinariesDirectory = testBinariesDirectory;
            }
            return(stateCollection);
        }