Beispiel #1
0
 internal FireDumpItem(FireDumpType type, object content, string file, string line, string label)
 {
     this.Type    = type;
     this.Content = content;
     this.File    = file;
     this.Line    = line;
     this.Label   = label;
 }
Beispiel #2
0
        /// <summary>
        /// Display value in browser console by <c>console.[log|info|debug|trace|warn|error|table](obj);</c> call.
        /// </summary>
        /// <param name="obj">Any value to serialize with <c>(new JavascriptSerializer()).Serialize(obj);</c> and to display in client browser console.</param>
        /// <param name="dumpType">Javascript browser console object function name to call on client, but in upper case.</param>
        /// <returns>FireDump instance is returned to call any other FireDump method in call chain.</returns>
        public FireDump Dump(object obj, FireDumpType dumpType = FireDumpType.Debug)
        {
            if (!this._enabled)
            {
                return(this);
            }
            StackTraceItem callPoint = Completers.StackTrace.CompleteCallerPoint();

            return(this._renderHeaders(new FireDumpItem {
                Type = dumpType,
                File = callPoint.File.ToString(),
                Line = callPoint.Line,
                Content = obj
            }));
        }