public override void Load(string filename, string location, string name, uint flags, ref Guid iidProject, out int canceled) { base.Load(filename, location, name, flags, ref iidProject, out canceled); // WAP ask the designer service for the CodeDomProvider corresponding to the project node. this.OleServiceProvider.AddService(typeof(SVSMDCodeDomProvider), new OleServiceProvider.ServiceCreatorCallback(this.CreateServices), false); this.OleServiceProvider.AddService(typeof(System.CodeDom.Compiler.CodeDomProvider), new OleServiceProvider.ServiceCreatorCallback(this.CreateServices), false); IPythonLibraryManager libraryManager = Site.GetService(typeof(IPythonLibraryManager)) as IPythonLibraryManager; if (null != libraryManager) { libraryManager.RegisterHierarchy(this.InteropSafeHierarchy); } //If this is a WPFFlavor-ed project, then add a project-level DesignerContext service to provide //event handler generation (EventBindingProvider) for the XAML designer. this.OleServiceProvider.AddService(typeof(DesignerContext), new OleServiceProvider.ServiceCreatorCallback(this.CreateServices), false); }
public override int Close() { if (null != this.projectDocListenerForMainFileUpdates) { this.projectDocListenerForMainFileUpdates.Dispose(); this.projectDocListenerForMainFileUpdates = null; } if (null != Site) { IPythonLibraryManager libraryManager = Site.GetService(typeof(IPythonLibraryManager)) as IPythonLibraryManager; if (null != libraryManager) { libraryManager.UnregisterHierarchy(this.InteropSafeHierarchy); } } return(base.Close()); }