ScrollInStack Method
This commit is contained in:
		@@ -86,5 +86,23 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
			if (stackFrame1.GetILOffset() != stackFrame2.GetILOffset()) return false;
 | 
								if (stackFrame1.GetILOffset() != stackFrame2.GetILOffset()) return false;
 | 
				
			||||||
			return true;
 | 
								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;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user