示例#1
0
        // Called by the WinForm designer at load time
        public override CodeCompileUnit Parse(TextReader codeStream)
        {
            var compileUnit = ToXCodeCompileUnit(base.Parse(codeStream));

            //
#if WRITE2LOGFILE
            string path = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            path = Path.Combine(path, "XSharpDumpCodeCompileUnit_parse.log");
            XSharpCodeDomHelper1.DumpCodeCompileUnit(compileUnit, path, true);
#endif
            return(compileUnit);
        }
示例#2
0
        public override void GenerateCodeFromCompileUnit(CodeCompileUnit compileUnit, TextWriter writer, CodeGeneratorOptions options)
        {
            {
                //
                base.GenerateCodeFromCompileUnit(compileUnit, writer, options);
                //
#if WRITE2LOGFILE
                string path = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
                path = Path.Combine(path, "XSharpDumpCodeCompileUnit_generate.log");
                XSharpCodeDomHelper1.DumpCodeCompileUnit(compileUnit, path, true);
#endif
            }
        }
示例#3
0
        public override void GenerateCodeFromCompileUnit(CodeCompileUnit compileUnit, TextWriter writer, CodeGeneratorOptions options)
        {
            {
                //
                // validate to see if something has changed in the compileUnit
                //
                if (options == null)
                {
                    options = new CodeGeneratorOptions();
                }
                options.BlankLinesBetweenMembers = false;
                base.GenerateCodeFromCompileUnit(compileUnit, writer, options);
                //
#if WRITE2LOGFILE
                string path = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
                path = Path.Combine(path, "XSharpDumpCodeCompileUnit_generate.log");
                XSharpCodeDomHelper1.DumpCodeCompileUnit(compileUnit, path, true);
#endif
            }
        }