Changed Property - CalledFrom - Returns Method that called the current Method
This commit is contained in:
parent
ecb9f7f872
commit
4e8b7932bd
@ -118,16 +118,14 @@ namespace Volian.Base.Library
|
||||
int count = 0;
|
||||
foreach (StackFrame sf in sfs)
|
||||
{
|
||||
if (sf.GetFileLineNumber() != 0)
|
||||
if (sf.GetFileLineNumber() != 0) // Only look at Local Methods
|
||||
{
|
||||
count++;
|
||||
if (count > 4) // The fourth entry should be the Calling Method
|
||||
{
|
||||
string sMethod = sf.GetMethod().Name;
|
||||
string sNamespace = sf.GetMethod().ReflectedType.Namespace;
|
||||
string sType = sf.GetMethod().ReflectedType.Name;
|
||||
sMethod += string.Format(" {0}[{1}]", sf.GetFileName(), sf.GetFileLineNumber());
|
||||
if (count > 3)
|
||||
return string.Format("{0}.{1}.{2}", sNamespace, sType, sMethod);
|
||||
string sMethod = sf.GetMethod().Name;
|
||||
return string.Format("{0}.{1}[{2}]", sType, sMethod, sf.GetFileLineNumber());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user