1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
4 | *
|
---|
5 | * This file is part of HeuristicLab.
|
---|
6 | *
|
---|
7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
8 | * it under the terms of the GNU General Public License as published by
|
---|
9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
10 | * (at your option) any later version.
|
---|
11 | *
|
---|
12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public License
|
---|
18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
19 | */
|
---|
20 | #endregion
|
---|
21 |
|
---|
22 | using System;
|
---|
23 | using System.Collections.Generic;
|
---|
24 | using System.Text;
|
---|
25 | using System.Windows.Forms;
|
---|
26 | using System.Reflection;
|
---|
27 |
|
---|
28 | namespace HeuristicLab.PluginInfrastructure {
|
---|
29 | /// <summary>
|
---|
30 | /// Interface for application managers.
|
---|
31 | /// </summary>
|
---|
32 | public interface IApplicationManager {
|
---|
33 | /// <summary>
|
---|
34 | /// Gets all discovered plugins.
|
---|
35 | /// </summary>
|
---|
36 | IEnumerable<IPluginDescription> Plugins { get; }
|
---|
37 | /// <summary>
|
---|
38 | /// Gets all discovered applications.
|
---|
39 | /// </summary>
|
---|
40 | IEnumerable<IApplicationDescription> Applications { get; }
|
---|
41 |
|
---|
42 | /// <summary>
|
---|
43 | /// Dynamically loads assemblies given in binary form.
|
---|
44 | /// </summary>
|
---|
45 | /// <param name="assemblies">Assemblies that should be loaded in binary form.</param>
|
---|
46 | void LoadAssemblies(IEnumerable<byte[]> assemblies);
|
---|
47 |
|
---|
48 | /// <summary>
|
---|
49 | /// Discovers and creates instances of <typeparamref name="T"/> and all types implementing or inheriting <typeparamref name="T"/> (directly and indirectly) declared in any assembly of <paramref name="plugin"/>.
|
---|
50 | /// </summary>
|
---|
51 | /// <typeparam name="T">The type or super-type to discover.</typeparam>
|
---|
52 | /// <param name="plugin">The declaring plugin.</param>
|
---|
53 | /// <returns>An enumerable of instances of the discovered types.</returns>
|
---|
54 | IEnumerable<T> GetInstances<T>(IPluginDescription plugin) where T : class;
|
---|
55 | /// <summary>
|
---|
56 | /// Discovers and creates instances of <typeparamref name="T"/> and all types implementing or inheriting <typeparamref name="T"/> (directly and indirectly).
|
---|
57 | /// </summary>
|
---|
58 | /// <typeparam name="T">The type or super-type to discover.</typeparam>
|
---|
59 | /// <returns>An enumerable of instances of the discovered types.</returns>
|
---|
60 | IEnumerable<T> GetInstances<T>() where T : class;
|
---|
61 |
|
---|
62 | /// <summary>
|
---|
63 | /// Discovers all types implementing or inheriting <paramref name="type"/> (directly and indirectly).
|
---|
64 | /// </summary>
|
---|
65 | /// <param name="type">The type to discover.</param>
|
---|
66 | /// <returns>An enumerable of discovered types.</returns>
|
---|
67 | IEnumerable<Type> GetTypes(Type type);
|
---|
68 | /// <summary>
|
---|
69 | /// Discovers all types implementing or inheriting <paramref name="type"/> (directly and indirectly) that are declaed in any assembly of <paramref name="plugin"/>.
|
---|
70 | /// </summary>
|
---|
71 | /// <param name="type">The type to discover.</param>
|
---|
72 | /// <param name="plugin">The declaring plugin.</param>
|
---|
73 | /// <returns>An enumerable of discovered types.</returns>
|
---|
74 | IEnumerable<Type> GetTypes(Type type, IPluginDescription plugin);
|
---|
75 | }
|
---|
76 | }
|
---|