public void Build()
        {
            //ext
            OnBuildStarting();

            xmlModel = new StateMachineXmlModel(InputFileName);
            model    = xmlModel.Build();

            //ext
            OnModelRead(model);

            StreamWriter streamWriter = new StreamWriter(OutputFileName);

            CodeCompileUnit code          = new CodeCompileUnit();
            CodeNamespace   codeNamespace = CreateNameSpace(code);

            WriteHeader(codeNamespace);

            coder = new CoderStateMachine(model, Options, codeNamespace);
            coder.WriteCode();



            OnBuildWriteCompleted(coder, codeNamespace, code, model);

            codeDomProvider.GenerateCodeFromNamespace(codeNamespace, streamWriter, null);

            streamWriter.Close();

            OnBuildCompleted(coder, codeNamespace, code, model, OutputFileName, OutputDirectory);
        }
        partial void OnBuildCompleted(CoderStateMachine coder, CodeNamespace codeNamespace, CodeCompileUnit code, StateMachineType model, string outputFileName, string outputDirectory)
        {
            //Hack to make Partial method
            postPatchPartialDeclarationOnFileOut( );

            CodeChanger cc = new CodeChanger( );

            cc.ChangeCode(outputFileName, outputFileName.Replace(".cs", "_.cs"));
        }
Example #3
0
        public void Build()
        {
            xmlModel = new StateMachineXmlModel(InputFileName);
            model    = xmlModel.Build();

            StreamWriter streamWriter = new StreamWriter(OutputFileName);

            CodeCompileUnit code          = new CodeCompileUnit();
            CodeNamespace   codeNamespace = CreateNameSpace(code);

            WriteHeader(codeNamespace);

            coder = new CoderStateMachine(model, Options, codeNamespace);
            coder.WriteCode();

            codeDomProvider.GenerateCodeFromNamespace(codeNamespace, streamWriter, null);

            streamWriter.Close();
        }
 partial void OnBuildWriteCompleted(CoderStateMachine coder, CodeNamespace codeNamespace, CodeCompileUnit code, StateMachineType model);
 partial void OnBuildCompleted(CoderStateMachine coder, CodeNamespace codeNamespace, CodeCompileUnit code, StateMachineType model, string outputFileName, string outputDirectory);