public SDProjectService() { allSolutions = new NullSafeSimpleModelCollection <ISolution>(); allProjects = allSolutions.SelectMany(s => s.Projects); projectBindings = SD.AddInTree.BuildItems <ProjectBindingDescriptor>("/SharpDevelop/Workbench/ProjectBindings", null); targetFrameworks = SD.AddInTree.BuildItems <TargetFramework>("/SharpDevelop/TargetFrameworks", null); SD.GetFutureService <IWorkbench>().ContinueWith(t => t.Result.ActiveViewContentChanged += ActiveViewContentChanged).FireAndForget(); var applicationStateInfoService = SD.GetService <ApplicationStateInfoService>(); if (applicationStateInfoService != null) { applicationStateInfoService.RegisterStateGetter("ProjectService.CurrentSolution", delegate { return(CurrentSolution); }); applicationStateInfoService.RegisterStateGetter("ProjectService.CurrentProject", delegate { return(CurrentProject); }); } SD.Services.AddService(typeof(IProjectServiceRaiseEvents), this); }