public void AddTrace(FileTrace Trace) { if (!Trace.Calls.Any()) { return; } var page = Pages.SingleOrDefault(x => x.Page == Trace.File); if (page == null) { page = new ApplicationMapPage() { Page = Trace.File }; Pages.Add(page); } foreach (var superglobal in Php.Superglobals) { var fields = page.SuperglobalNameCollectionTable[superglobal]; var traceFields = Trace.Calls .Where(x => x.ParameterValues.Any() && x.Name == superglobal && !fields.Contains(x.ParameterValues[0])) .Select(x => x.ParameterValues[0]); if (!traceFields.Any()) { continue; } fields.AddRange(traceFields); } }
public void AddTrace(FileTrace Trace) { if (!Trace.Calls.Any()) return; var page = Pages.SingleOrDefault(x => x.Page == Trace.File); if (page == null) { page = new ApplicationMapPage() { Page = Trace.File }; Pages.Add(page); } foreach (var superglobal in Php.Superglobals) { var fields = page.SuperglobalNameCollectionTable[superglobal]; var traceFields = Trace.Calls .Where(x => x.ParameterValues.Any() && x.Name == superglobal && !fields.Contains(x.ParameterValues[0])) .Select(x => x.ParameterValues[0]); if (!traceFields.Any()) continue; fields.AddRange(traceFields); } }