Exemple #1
0
        public static void AddWorkerRoleToDef(string path, Dictionary <string, object> parameters)
        {
            RoleInfo          role       = parameters["Role"] as RoleInfo;
            ServiceComponents components = parameters["Components"] as ServiceComponents;
            ServicePathInfo   paths      = parameters["Paths"] as ServicePathInfo;
            WorkerRole        workerRole = General.DeserializeXmlFile <ServiceDefinition>(path).WorkerRole[0];

            role.AddRoleToDefinition(components.Definition, workerRole);
            components.Save(paths);
        }
Exemple #2
0
        public static void AddWebRoleToDef(string path, Dictionary <string, object> parameters)
        {
            RoleInfo                  role       = parameters["Role"] as RoleInfo;
            ServiceComponents         components = parameters["Components"] as ServiceComponents;
            PowerShellProjectPathInfo paths      = parameters["Paths"] as PowerShellProjectPathInfo;
            WebRole webRole = XmlUtilities.DeserializeXmlFile <ServiceDefinition>(path).WebRole[0];

            role.AddRoleToDefinition(components.Definition, webRole);
            components.Save(paths);
        }