コード例 #1
0
        private void WriteHeader(HeaderDefinition header)
        {
            if (header.Nodes.Count == 0)
            {
                return;
            }

            var fileWriter           = new CSharpFileTokenizer();
            TokenizerContext context = fileWriter.Tokenize(header);

            var tokenWriter = new TokenWriter();

            tokenWriter.Write(header.FullPath, context);
        }
コード例 #2
0
        public virtual void VisitExceptionNode(ExceptionNode exception)
        {
            VisitTypeSpec(exception.Type);

            if (exception.Message != null)
            {
                writer.Write(": {0}", exception.Message);
            }

            if (exception.InnerException != null)
            {
                writer.Write(" ---> ");
                exception.InnerException.AcceptVisitor(this);
                writer.WriteLine();
                writer.Write("  --- End of inner exception stack trace ---");
            }

            if (exception.StackTrace != null)
            {
                writer.WriteLine();
                exception.StackTrace.AcceptVisitor(this);
            }
        }