private void OnRazorNamespacesFound(string[] razorNamespaces) { List <string> namespaceList = new List <string>(); if (razorNamespaces != null) { namespaceList.AddRange(razorNamespaces); } WebEditor.DispatchOnUIThread(delegate { OnRazorNamespacesFoundMainThread(namespaceList); }); }
private void DocumentParseComplete(object sender, DocumentParseCompleteEventArgs e) { if (_parseData == null) { return; } ParseData parseData = _parseData; bool flag2; lock (parseData) { flag2 = _parseData.Update(e); } if (flag2) { WebEditor.DispatchOnUIThread(delegate { DocumentParseCompleteMainThread(); }); } }
protected void UpdateListEntriesSync(JsonCompletionContext context, IEnumerable <JsonCompletionEntry> allEntries) { if (context.Session.IsDismissed) { return; } foreach (CompletionSet curCompletionSet in (context.Session as ICompletionSession)?.CompletionSets) { if (curCompletionSet is WebCompletionSet webCompletionSet) { WebEditor.DispatchOnUIThread(() => { // only delete our completion entries webCompletionSet.UpdateCompletions(s => s is SimpleCompletionEntry, allEntries); }); // The UpdateCompletions call above may modify the collection we're enumerating. That's ok, as we're done anyways. break; } } }