Example #1
0
        /// <summary>
        /// Gets the caller information report.
        /// </summary>
        /// <param name="output">The output.</param>
        /// <returns></returns>
        public static String getCallerInfoReport(this callerInfo output)
        {
            builderForMarkdown sb = new builderForMarkdown();

            sb.Append("Caller info report:", appendType.heading_3, true);

            sb.nextTabLevel();
            // sb.AppendLine("Caller method: " + labelFormat);

            sb.AppendPair("Call in code: ", output.sufix);


            sb.AppendPair("Method name: ", output.className);

            sb.AppendPair("Source file: ", output.Filepath);

            sb.Append("Source call line: ", appendType.bold, true);

            sb.Append(output.sourceCodeLine, appendType.source, true);

            sb.Append("Source call line segment: ", appendType.regular, true);
            sb.Append(output.sourceCodeInvokePart, appendType.source, true);

            sb.Append("Caller method local variables:", appendType.heading_4);
            sb.nextTabLevel();

            output.localVariables.ForEach(
                x => sb.Append(
                    String.Format("{0}:{1} {2}", x.LocalIndex, x.LocalType.Name, x.toStringSafe()), appendType.quotation)
                );
            sb.prevTabLevel();

            sb.AppendPair("Caller source line properties:", output.sourceCodeParameterCalls.toCsvInLine());

            sb.prevTabLevel();

            sb.prevTabLevel();

            return(sb.ToString());
        }