示例#1
0
        public ProjectCompileResult Compile()
        {
            if (!File.Exists(ProjectFilePath))
            {
                string projectFileKey = ProjectFilePath;
                MessageCollection.AddError(
                    new CompileMessage(new CompileMessageSrcKey(projectFileKey), 0, 0, "项目文件'" + projectFileKey + "'不存在"));

                ProjectCompileResult psr = new ProjectCompileResult()
                {
                    MessageCollection = MessageCollection
                };
                return(psr);
            }
            SourceProjectModel projectModel = ReadModel();

            if (projectModel != null)
            {
                builder = new ZProjectEngine(MessageCollection, projectModel);
                var result = builder.Compile();
                if (result.ProjectModel == null)
                {
                    result.ProjectModel = projectModel;
                }
                return(result);
            }
            return(null);
        }
示例#2
0
        public ProjectCompileResult Compile(string filePath)
        {
            //FileInfo zlogoFileInfo = new FileInfo(filePath);
            ZProjectModel        projectModel = Init(filePath);
            ZProjectEngine       builder      = new ZProjectEngine();
            ProjectCompileResult result       = builder.Compile(projectModel);

            return(result);
        }
示例#3
0
        public ProjectCompileResult Compile(string srcPath)
        {
            InitFile(srcPath);
            ZProjectEngine       builder2 = new ZProjectEngine();
            ProjectCompileResult result   = builder2.Compile(projectModel);

            CompileResult = result;
            return(result);
        }
示例#4
0
        //string projectFilePath;
        public ProjectCompileResult Compile(FileInfo projectFileInfo)
        {
            //Messager.Clear();
            //this.projectFilePath = projectFilePath;
            ZProjectModel        projectModel = ReadModel(projectFileInfo);
            ZProjectEngine       builder2     = new ZProjectEngine();
            ProjectCompileResult result       = builder2.Compile(projectModel);

            return(result);
        }
示例#5
0
        public ProjectCompileResult Compile(string srcPath, CompileMessageCollection messageCollection)
        {
            MessageCollection = messageCollection;
            projectModel      = new SourceProjectModel();
            InitFile(srcPath);
            if (this.InitProjectAct != null)
            {
                InitProjectAct(projectModel, srcPath);
            }
            ZProjectEngine       builder2 = new ZProjectEngine(MessageCollection, projectModel);
            ProjectCompileResult result   = builder2.Compile();

            result.ProjectModel = projectModel;
            CompileResult       = result;
            return(result);
        }