28 lines
362 B
C#
28 lines
362 B
C#
|
|
|
|
|
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
|
|
|
|
|
static public class DebugEx
|
|
{
|
|
|
|
|
|
extension(StackFrame sf)
|
|
{
|
|
public string Method => sf.GetMethod().Name;
|
|
public string File => sf.GetFileName();
|
|
public int Line => sf.GetFileLineNumber();
|
|
public int Column => sf.GetFileColumnNumber();
|
|
|
|
public string Log => $"{sf.File}({sf.Line}, {sf.Column}): {sf.Method}";
|
|
}
|
|
|
|
|
|
|
|
|
|
} |