コード例 #1
0
        /// <summary>
        /// Main entry point
        /// </summary>
        /// <param name="Arguments">Command-line arguments</param>
        /// <returns>One of the values of ECompilationResult</returns>
        public override int Execute(CommandLineArguments Arguments)
        {
            Arguments.ApplyTo(this);

            // Read the XML configuration files
            XmlConfig.ApplyTo(this);

            // Create the build configuration object, and read the settings
            BuildConfiguration BuildConfiguration = new BuildConfiguration();

            XmlConfig.ApplyTo(BuildConfiguration);
            Arguments.ApplyTo(BuildConfiguration);

            // Read the actions file
            List <Action> Actions;

            using (Timeline.ScopeEvent("ActionGraph.ReadActions()"))
            {
                Actions = ActionGraph.ImportJson(ActionsFile);
            }

            // Link the action graph
            using (Timeline.ScopeEvent("ActionGraph.Link()"))
            {
                ActionGraph.Link(Actions);
            }

            // Execute the actions
            using (Timeline.ScopeEvent("ActionGraph.ExecuteActions()"))
            {
                ActionGraph.ExecuteActions(BuildConfiguration, Actions);
            }

            return(0);
        }