protected FunctionCall GetActiveFunction(Stack <FunctionCall> stack) { if (stack == null) { return(null); } // Find active function FunctionCall activeFunc = null; if (stack.Count > 0) { activeFunc = stack.Peek(); } return(activeFunc); }
public FunctionPresentation(FunctionCall call) { if (call == null) { IsNull = true; IsCtor = false; return; } IsNull = false; TypeName = call.TypeName; Function = call.Function; IsCtor = call.IsCtor; IsRecursive = call.IsRecursive; FullName = call.FullName; // Underlying object is modified by the filter UI IsFiltered = call.IsFiltered; }
private static bool CanRemove(FunctionCall exitFunc) { return(exitFunc.IsFiltered && exitFunc.HasVisibleChildren == false); }
private static void CleanupHiddenCalls(Dictionary <ulong, FunctionCall> allFunctions, FunctionCall exitFunc) { if (CanRemove(exitFunc)) { //Debug.WriteLine("Removing " + exitFunc.FullName); RemoveFrom(allFunctions, exitFunc.Id); // Cleanup all calls to this function. There is nothing worth down there. foreach (var parent in exitFunc.Parents) { parent.Children.Remove(exitFunc); } exitFunc.Parents.Clear(); } }