static void OnLoadUserPrefs(object s, UserPreferencesEventArgs args) { XmlElement elem = args.Properties.GetValue <XmlElement> ("MonoDevelop.Ide.DebuggingService.Breakpoints"); if (elem == null) { elem = args.Properties.GetValue <XmlElement> ("MonoDevelop.Ide.DebuggingService"); } if (elem != null) { lock (breakpoints) breakpoints.Load(elem); } PinnedWatchStore wstore = args.Properties.GetValue <PinnedWatchStore> ("MonoDevelop.Ide.DebuggingService.PinnedWatches"); if (wstore != null) { pinnedWatches.LoadFrom(wstore); } lock (breakpoints) pinnedWatches.BindAll(breakpoints); }
static Task OnLoadUserPrefs(object s, UserPreferencesEventArgs args) { var elem = args.Properties.GetValue <XmlElement> ("MonoDevelop.Ide.DebuggingService.Breakpoints") ?? args.Properties.GetValue <XmlElement> ("MonoDevelop.Ide.DebuggingService"); if (elem != null) { lock (breakpoints) breakpoints.Load(elem); } PinnedWatchStore wstore = args.Properties.GetValue <PinnedWatchStore> ("MonoDevelop.Ide.DebuggingService.PinnedWatches"); if (wstore != null) { pinnedWatches.LoadFrom(wstore); } lock (breakpoints) pinnedWatches.BindAll(breakpoints); return(Task.FromResult(true)); }