Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IApplicationManager.cs @ 5606

Last change on this file since 5606 was 5445, checked in by swagner, 14 years ago

Updated year of copyrights (#1406)

File size: 4.3 KB
RevLine 
[2488]1#region License Information
2/* HeuristicLab
[5445]3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
[2488]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
22using System;
23using System.Collections.Generic;
24
25namespace HeuristicLab.PluginInfrastructure {
26  /// <summary>
27  /// Interface for application managers.
28  /// </summary>
29  public interface IApplicationManager {
[2504]30    /// <summary>
31    /// Gets all discovered plugins.
32    /// </summary>
[2488]33    IEnumerable<IPluginDescription> Plugins { get; }
[2642]34
[2504]35    /// <summary>
36    /// Gets all discovered applications.
37    /// </summary>
[2488]38    IEnumerable<IApplicationDescription> Applications { get; }
39
[2504]40    /// <summary>
41    /// Discovers and creates instances of <typeparamref name="T"/> and all types implementing or inheriting <typeparamref name="T"/> (directly and indirectly).
42    /// </summary>
43    /// <typeparam name="T">The type or super-type to discover.</typeparam>
44    /// <returns>An enumerable of instances of the discovered types.</returns>
[2488]45    IEnumerable<T> GetInstances<T>() where T : class;
46
[2504]47    /// <summary>
[2592]48    /// Discovers and creates instances of <paramref name="type"/> and all types implementing or inheriting <paramref name="type"/> (directly and indirectly).
49    /// </summary>
[3092]50    /// <param name="type">The type or super-type to discover.</param>
[2592]51    /// <returns>An enumerable of instances of the discovered types.</returns>
52    IEnumerable<object> GetInstances(Type type);
53
54    /// <summary>
[2504]55    /// Discovers all types implementing or inheriting <paramref name="type"/> (directly and indirectly).
56    /// </summary>
57    /// <param name="type">The type to discover.</param>
58    /// <returns>An enumerable of discovered types.</returns>
[2488]59    IEnumerable<Type> GetTypes(Type type);
[2642]60
[2504]61    /// <summary>
[2642]62    /// Discovers all types implementing or inheriting <paramref name="type"/> (directly and indirectly).
63    /// </summary>
64    /// <param name="type">The type to discover.</param>
65    /// <param name="onlyInstantiable">Return only types that are instantiable (instance, abstract... are not returned)</param>
66    /// <returns>An enumerable of discovered types.</returns>
67    IEnumerable<Type> GetTypes(Type type, bool onlyInstantiable);
68
69    /// <summary>
[2504]70    /// Discovers all types implementing or inheriting <paramref name="type"/> (directly and indirectly) that are declaed in any assembly of <paramref name="plugin"/>.
71    /// </summary>
72    /// <param name="type">The type to discover.</param>
73    /// <param name="plugin">The declaring plugin.</param>
74    /// <returns>An enumerable of discovered types.</returns>
75    IEnumerable<Type> GetTypes(Type type, IPluginDescription plugin);
[2642]76
[2592]77    /// <summary>
[2642]78    /// Discovers all types implementing or inheriting <paramref name="type"/> (directly and indirectly) that are declaed in any assembly of <paramref name="plugin"/>.
79    /// </summary>
80    /// <param name="type">The type to discover.</param>
81    /// <param name="plugin">The declaring plugin.</param>
82    /// <param name="onlyInstantiable">Return only types that are instantiable (instance, abstract... are not returned)</param>
83    /// <returns>An enumerable of discovered types.</returns>
84    IEnumerable<Type> GetTypes(Type type, IPluginDescription plugin, bool onlyInstantiable);
85
86    /// <summary>
[2592]87    /// Finds the plugin that declares the <paramref name="type">type</paramref>.
88    /// </summary>
89    /// <param name="type">The type of interest.</param>
90    /// <returns>The description of the plugin that declares the given type or null if the type has not been declared by a known plugin.</returns>
91    IPluginDescription GetDeclaringPlugin(Type type);
[2488]92  }
93}
Note: See TracBrowser for help on using the repository browser.