ScrollInStack Method

This commit is contained in:
Rich 2009-03-28 22:33:18 +00:00
parent c56e3f07ef
commit 21092698e2

View File

@ -86,5 +86,23 @@ namespace Volian.Controls.Library
if (stackFrame1.GetILOffset() != stackFrame2.GetILOffset()) return false;
return true;
}
public static bool ScrollInStack()
{
StackTrace st = new StackTrace(true);
StackFrame[] sfs = st.GetFrames();
bool retval = false;
foreach (StackFrame sf in sfs)
{
string sMethod = sf.GetMethod().Name;
string sNamespace = sf.GetMethod().ReflectedType.Namespace;
string sType = sf.GetMethod().ReflectedType.Name;
if (sMethod.ToUpper().Contains("SCROLL") || sType.ToUpper().Contains("SCROLL"))
{
retval = true;
Console.WriteLine("{0}.{1}.{2}", sNamespace, sType, sMethod);
}
}
return retval;
}
}
}