Changeset 2748 for trunk/sources
- Timestamp:
- 02/04/10 09:38:25 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.PluginInfrastructure
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/ApplicationManager.cs
r2693 r2748 46 46 } 47 47 48 /// <summary> 49 /// Fired when a plugin is loaded. 50 /// </summary> 48 51 internal event EventHandler<PluginInfrastructureEventArgs> PluginLoaded; 52 /// <summary> 53 /// Fired when a plugin is unloaded (when the application terminates). 54 /// </summary> 49 55 internal event EventHandler<PluginInfrastructureEventArgs> PluginUnloaded; 50 56 … … 83 89 } 84 90 91 /// <summary> 92 /// Prepares the application domain for the execution of an HL application. 93 /// Pre-loads all <paramref name="plugins"/>. 94 /// </summary> 95 /// <param name="apps">Enumerable of available HL applications.</param> 96 /// <param name="plugins">Enumerable of plugins that should be pre-loaded.</param> 85 97 internal void PrepareApplicationDomain(IEnumerable<ApplicationDescription> apps, IEnumerable<PluginDescription> plugins) { 86 98 this.plugins = new List<PluginDescription>(plugins); … … 99 111 } 100 112 113 /// <summary> 114 /// Loads the <paramref name="plugins"/> into this application domain. 115 /// </summary> 116 /// <param name="plugins">Enumerable of plugins that should be loaded.</param> 101 117 private void LoadPlugins(IEnumerable<PluginDescription> plugins) { 102 118 // load all loadable plugins (all dependencies available) into the execution context … … 116 132 } 117 133 134 /// <summary> 135 /// Runs the application declared in <paramref name="appInfo"/>. 136 /// This is a synchronous call. When the application is terminated all plugins are unloaded. 137 /// </summary> 138 /// <param name="appInfo">Description of the application to run</param> 118 139 internal void Run(ApplicationDescription appInfo) { 119 140 IApplication runnablePlugin = (IApplication)Activator.CreateInstance(appInfo.DeclaringAssemblyName, appInfo.DeclaringTypeName).Unwrap(); … … 193 214 /// </summary> 194 215 /// <param name="type">Most general type for which to find matching types.</param> 195 /// <param name="onlyInstantiable">Return only types that are instantiable (instance, abstract... are not returned)</param> 216 /// <param name="onlyInstantiable">Return only types that are instantiable 217 /// (interfaces, abstract classes... are not returned)</param> 196 218 /// <returns>Enumerable of the discovered types.</returns> 197 219 internal static IEnumerable<Type> GetTypes(Type type, bool onlyInstantiable) { … … 207 229 /// <param name="type">Most general type for which to find matching types.</param> 208 230 /// <param name="plugin">The plugin the subtypes must be part of.</param> 209 /// <param name="onlyInstantiable">Return only types that are instantiable (instance, abstract... are not returned)</param> 231 /// <param name="onlyInstantiable">Return only types that are instantiable 232 /// (interfaces, abstract classes... are not returned)</param> 210 233 /// <returns>Enumerable of the discovered types.</returns> 211 234 internal static IEnumerable<Type> GetTypes(Type type, IPluginDescription pluginDescription, bool onlyInstantiable) { … … 223 246 /// <param name="type">Most general type we want to find.</param> 224 247 /// <param name="assembly">Assembly that should be searched for types.</param> 225 /// <param name="onlyInstantiable">Return only types that are instantiable (instance, abstract... are not returned)</param> 248 /// <param name="onlyInstantiable">Return only types that are instantiable 249 /// (interfaces, abstract classes... are not returned)</param> 226 250 /// <returns>Enumerable of the discovered types.</returns> 227 251 private static IEnumerable<Type> GetTypes(Type type, Assembly assembly, bool onlyInstantiable) { -
trunk/sources/HeuristicLab.PluginInfrastructure/Attributes/PluginAttribute.cs
r2504 r2748 52 52 /// </summary> 53 53 public PluginAttribute(string name) 54 : this(name, "") {54 : this(name, string.Empty) { 55 55 } 56 56 … … 61 61 /// </summary> 62 62 public PluginAttribute(string name, string description) { 63 if (string.IsNullOrEmpty(name)) throw new ArgumentException("Plugin name is null or empty."); 64 if (description == null) throw new ArgumentNullException("description"); 63 65 this.name = name; 64 66 this.description = description; -
trunk/sources/HeuristicLab.PluginInfrastructure/Attributes/PluginDependencyAttribute.cs
r2504 r2748 26 26 namespace HeuristicLab.PluginInfrastructure { 27 27 /// <summary> 28 /// This attribute can be used to declare that a nplugin depends on a another plugin.28 /// This attribute can be used to declare that a plugin depends on a another plugin. 29 29 /// </summary> 30 30 [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] -
trunk/sources/HeuristicLab.PluginInfrastructure/BaseClasses/PluginBase.cs
r2592 r2748 58 58 } 59 59 60 /// <inhertitdoc >60 /// <inhertitdoc /> 61 61 public virtual void OnLoad() { } 62 /// <inhertitdoc >62 /// <inhertitdoc /> 63 63 public virtual void OnUnload() { } 64 64 #endregion -
trunk/sources/HeuristicLab.PluginInfrastructure/HeuristicLab.PluginInfrastructure.csproj
r2688 r2748 94 94 <Compile Include="Advanced\InstallationManagerConsole.cs" /> 95 95 <Compile Include="Advanced\InstallationManager.cs" /> 96 <Compile Include="Advanced\InstallationManagerForm.cs"> 97 <SubType>Form</SubType> 98 </Compile> 99 <Compile Include="Advanced\InstallationManagerForm.Designer.cs"> 100 <DependentUpon>InstallationManagerForm.cs</DependentUpon> 101 </Compile> 96 102 <Compile Include="Attributes\ApplicationAttribute.cs" /> 97 103 <Compile Include="Attributes\AssemblyBuildDateAttribute.cs" /> … … 122 128 <Compile Include="Main.cs" /> 123 129 <Compile Include="Properties\AssemblyInfo.cs" /> 130 <EmbeddedResource Include="Advanced\InstallationManagerForm.resx"> 131 <DependentUpon>InstallationManagerForm.cs</DependentUpon> 132 </EmbeddedResource> 124 133 <EmbeddedResource Include="Properties\Resources.resx"> 125 134 <Generator>ResXFileCodeGenerator</Generator> -
trunk/sources/HeuristicLab.PluginInfrastructure/Starter/StarterForm.cs
r2527 r2748 33 33 using HeuristicLab.PluginInfrastructure.Manager; 34 34 using System.IO; 35 using HeuristicLab.PluginInfrastructure.Advanced; 35 36 36 37 namespace HeuristicLab.PluginInfrastructure.Starter { … … 45 46 InitializeComponent(); 46 47 47 string pluginPath = Path.GetFullPath(Application.StartupPath); 48 string pluginPath = Path.GetFullPath(Application.StartupPath); 48 49 pluginManager = new PluginManager(pluginPath); 49 50 SplashScreen splashScreen = new SplashScreen(pluginManager, 1000, "Loading HeuristicLab..."); … … 77 78 var appDesc = (from desc in pluginManager.Applications 78 79 where desc.Name == appName 79 select desc).Single ();80 select desc).SingleOrDefault(); 80 81 if (appDesc != null) { 81 82 StartApplication(appDesc); … … 93 94 if (selected == pluginManagerListViewItem) { 94 95 try { 95 //Cursor = Cursors.AppStarting;96 //ManagerForm form = newManagerForm();97 //this.Visible = false;98 //form.ShowDialog(this);99 // //RefreshApplicationsList();100 //this.Visible = true;96 Cursor = Cursors.AppStarting; 97 InstallationManagerForm form = new InstallationManagerForm(); 98 this.Visible = false; 99 form.ShowDialog(this); 100 // RefreshApplicationsList(); 101 this.Visible = true; 101 102 } 102 103 finally {
Note: See TracChangeset
for help on using the changeset viewer.