コード例 #1
0
        /// <summary>
        /// Adds the given role to both config files and the service def.
        /// </summary>
        /// <param name="role"></param>
        private void AddPythonRoleCore(RoleInfo role, RoleType type)
        {
            Dictionary <string, object> parameters = CreateDefaultParameters(role);

            string scaffoldPath = Path.Combine(Path.Combine(scaffoldingFolderPath, Resources.PythonScaffolding), type.ToString());

            Scaffold.GenerateScaffolding(scaffoldPath, Path.Combine(Paths.RootPath, role.Name), parameters);
        }
コード例 #2
0
        /// <summary>
        /// Adds the given role to both config files and the service def.
        /// </summary>
        private void AddRoleCore(String Scaffolding, RoleInfo role, RoleType type)
        {
            Dictionary <string, object> parameters = CreateDefaultParameters(role);

            parameters[ScaffoldParams.NodeModules]           = General.GetNodeModulesPath();
            parameters[ScaffoldParams.NodeJsProgramFilesX86] = General.GetWithProgramFilesPath(Resources.NodeProgramFilesFolderName, false);

            string scaffoldPath = Path.Combine(Path.Combine(scaffoldingFolderPath, Scaffolding), type.ToString());

            Scaffold.GenerateScaffolding(scaffoldPath, Path.Combine(Paths.RootPath, role.Name), parameters);
        }
コード例 #3
0
        private void CreateNewService(string serviceRootPath, string serviceName)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters[ScaffoldParams.Slot]               = string.Empty;
            parameters[ScaffoldParams.Subscription]       = string.Empty;
            parameters[ScaffoldParams.Location]           = string.Empty;
            parameters[ScaffoldParams.StorageAccountName] = string.Empty;
            parameters[ScaffoldParams.ServiceName]        = serviceName;

            Scaffold.GenerateScaffolding(Path.Combine(scaffoldingFolderPath, Resources.GeneralScaffolding), serviceRootPath, parameters);
        }
コード例 #4
0
        /// <summary>
        /// Adds the given role to both config files and the service def.
        /// </summary>
        /// <param name="role"></param>
        private void AddRoleCore(RoleInfo role, RoleType type)
        {
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters[ScaffoldParams.Role]           = role;
            parameters[ScaffoldParams.Components]     = Components;
            parameters[ScaffoldParams.RoleName]       = role.Name;
            parameters[ScaffoldParams.InstancesCount] = role.InstanceCount;
            parameters[ScaffoldParams.Port]           = Components.GetNextPort();
            parameters[ScaffoldParams.Paths]          = Paths;
            parameters[ScaffoldParams.NodeModules]    = General.GetNodeModulesPath();

            string scaffoldPath = Path.Combine(Path.Combine(scaffoldingFolderPath, Resources.NodeScaffolding), type.ToString());

            Scaffold.GenerateScaffolding(scaffoldPath, Path.Combine(Paths.RootPath, role.Name), parameters);
        }
コード例 #5
0
        /// <summary>
        /// Generates scaffolding for role.
        /// </summary>
        /// <param name="scaffolding">The relative scaffolding source path</param>
        /// <param name="roleName">The role name</param>
        /// <param name="parameters">The rule parameters</param>
        public void GenerateScaffolding(string scaffolding, string roleName, Dictionary <string, object> parameters)
        {
            string scaffoldPath = Path.Combine(scaffoldingFolderPath, scaffolding);

            Scaffold.GenerateScaffolding(scaffoldPath, Path.Combine(Paths.RootPath, roleName), parameters);
        }