Exemplo n.º 1
0
        /// <summary>
        /// Parses and deminifies a string containing a minified stack trace.
        /// </summary>
        public DeminifyStackTraceResult DeminifyStackTrace(string stackTraceString)
        {
            var minifiedStackFrames         = _stackTraceParser.ParseStackTrace(stackTraceString);
            var deminifiedStackFrameResults = minifiedStackFrames
                                              .Select(_stackFrameDeminifier.DeminifyStackFrame)
                                              .ToList();

            return(new DeminifyStackTraceResult(minifiedStackFrames, deminifiedStackFrameResults));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Parses and deminifies a string containing a minified stack trace.
        /// </summary>
        public DeminifyStackTraceResult DeminifyStackTrace(string stackTraceString)
        {
            DeminifyStackTraceResult result = new DeminifyStackTraceResult();

            result.MinifiedStackFrames         = _stackTraceParser.ParseStackTrace(stackTraceString);
            result.DeminifiedStackFrameResults = new List <StackFrameDeminificationResult>();

            foreach (StackFrame minifiedStackFrame in result.MinifiedStackFrames)
            {
                result.DeminifiedStackFrameResults.Add(_stackFrameDeminifier.DeminifyStackFrame(minifiedStackFrame));
            }

            return(result);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Parses and deminifies a string containing a minified stack trace.
        /// </summary>
        public DeminifyStackTraceResult DeminifyStackTrace(string stackTraceString)
        {
            DeminifyStackTraceResult result = new DeminifyStackTraceResult();

            result.MinifiedStackFrames         = _stackTraceParser.ParseStackTrace(stackTraceString, out string message);
            result.Message                     = message;
            result.DeminifiedStackFrameResults = new List <StackFrameDeminificationResult>();

            // Deminify frames in reverse order so we can pass the symbol name from caller
            // (i.e. the function name) into the next level's deminification.
            string callerSymbolName = null;

            for (int i = result.MinifiedStackFrames.Count - 1; i >= 0; i--)
            {
                var frame = _stackFrameDeminifier.DeminifyStackFrame(result.MinifiedStackFrames[i], callerSymbolName);
                callerSymbolName = frame?.DeminifiedSymbolName;
                result.DeminifiedStackFrameResults.Insert(0, frame);
            }

            return(result);
        }