private static bool hasQueryFromView(CallingMethodStackTrace item) { if (item == null || item.CallingMethodInfoList == null) { return(false); } foreach (var info in item.CallingMethodInfoList) { if (string.IsNullOrWhiteSpace(info.CallingFile)) { continue; } var ext = Path.GetExtension(info.CallingFile); if (string.IsNullOrWhiteSpace(ext)) { continue; } ext = ext.ToLowerInvariant(); if (_viewExtensions.Contains(ext)) { return(true); } } return(false); }
public CallingMethodStackTrace GetCallingMethodInfo(bool onlyIncludeInfoWithFileLine = false) { var results = new CallingMethodStackTrace(); var stackTrace = new StackTrace(true); var frameCount = stackTrace.FrameCount; var info = new StringBuilder(); var prefix = "-- "; for (var i = frameCount - 1; i >= 0; i--) { var sf = stackTrace.GetFrame(i); var methodInfo = getStackFrameInfo(sf, onlyIncludeInfoWithFileLine); if (methodInfo == null || string.IsNullOrWhiteSpace(methodInfo.StackTrace)) { continue; } info.AppendLine(prefix + methodInfo.StackTrace); prefix = "-" + prefix; results.CallingMethodInfoList.Add(methodInfo); } results.StackTraceHash = info.ToString().ComputeHash(); return(results); }
public void ManageStackTraces(CallingMethodStackTrace item) { if (item.ApplicationIdentity.Equals(GuiModelData.SelectedApplicationIdentity)) { GuiModelData.RelatedStackTraces.Add(item); } _localCallingMethodStackTraces.Add(item); PluginContext.NotifyPluginsHost(NotificationType.Update, 1); UpdateAppIdentityNotificationsCount(item.ApplicationIdentity); }