Пример #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
            }
        }