-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathStackTracer.cs
More file actions
34 lines (32 loc) · 1.07 KB
/
StackTracer.cs
File metadata and controls
34 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Diagnostics;
namespace AutoDI.Build
{
public static class StackTracer
{
public static AdditionalInformation GetStackTrace(Exception exception)
{
//var trace = new StackTrace(exception, true);
//var reflectedType = trace.GetFrame(0).GetMethod().ReflectedType;
var additionalInformation = new AdditionalInformation();
//if (reflectedType != null)
//{
// additionalInformation = new AdditionalInformation()
// {
// Column = trace.GetFrame(0).GetFileColumnNumber(),
// Line = trace.GetFrame(0).GetFileLineNumber(),
// //MethodName = reflectedType.FullName,
// File = trace.GetFrame(0).GetFileName()
// };
//
//}
return additionalInformation;
}
}
public class AdditionalInformation
{
public string File { get; set; }
public int Line { get; set; }
public int Column { get; set; }
}
}