Example #1
0
 private void InitializeManifest(string clusterManifestFileName)
 {
     if (clusterManifestFileName == "ClusterManifest-AllSettings.xml")
     {
         this.ClusterManifest = new ClusterManifestHelper(true, true).ClusterManifest;
     }
     else
     {
         this.ClusterManifest = TestUtility.ReadXml <ClusterManifestType>(Path.Combine(TestDirectory, clusterManifestFileName));
     }
     this.InfrastructureManifest = TestUtility.ReadXml <InfrastructureInformationType>(Path.Combine(TestDirectory, "InfrastructureManifest.xml"));
     this.PatchVersion           = this.GetVersion(Path.Combine(TestDirectory, "Fabric.exe"));
 }
Example #2
0
        public void InitializeManifest(string applicationBuildPath = null)
        {
            if (string.IsNullOrEmpty(applicationBuildPath))
            {
                this.ApplicationManifestType =
                    TestUtility.ReadXml <ApplicationManifestType>(Path.Combine(TestDirectory, "ApplicationManifest.xml"));

                this.ServiceManifestTypes = new Collection <ServiceManifestType>();
                this.ServiceManifestTypes.Add(
                    TestUtility.ReadXml <ServiceManifestType>(Path.Combine(TestDirectory, "ServiceManifest.xml")));

                this.SettingsType = TestUtility.ReadXml <SettingsType>(Path.Combine(TestDirectory, "Settings.xml"));

                this.GenerateApplicationFolderName();

                this.BuildLayoutSpecification = BuildLayoutSpecification.Create();
                this.BuildLayoutSpecification.SetRoot(this.ApplicationFolderName);

                this.ApplicationManifestPath = this.BuildLayoutSpecification.GetApplicationManifestFile();
            }
            else
            {
                this.ApplicationManifestType =
                    TestUtility.ReadXml <ApplicationManifestType>(Path.Combine(applicationBuildPath, "ApplicationManifest.xml"));

                var servicePkgDirectories = Directory.EnumerateDirectories(applicationBuildPath);
                this.ServiceManifestTypes = new Collection <ServiceManifestType>();
                foreach (var directory in servicePkgDirectories)
                {
                    if (File.Exists(Path.Combine(directory, "ServiceManifest.xml")))
                    {
                        this.ServiceManifestTypes.Add(
                            TestUtility.ReadXml <ServiceManifestType>(Path.Combine(directory, "ServiceManifest.xml")));
                    }
                }

                this.BuildLayoutSpecification = BuildLayoutSpecification.Create();
                this.BuildLayoutSpecification.SetRoot(Path.GetDirectoryName(applicationBuildPath));

                this.ApplicationManifestPath = this.BuildLayoutSpecification.GetApplicationManifestFile();
            }
        }