Changeset 4414
- Timestamp:
- 09/16/10 14:49:34 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.PluginInfrastructure/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginInfrastructureEventArgs.cs
r4068 r4414 24 24 namespace HeuristicLab.PluginInfrastructure.Manager { 25 25 [Serializable] 26 internalsealed class PluginInfrastructureEventArgs : EventArgs {27 internalobject Entity { get; private set; }28 internalPluginInfrastructureEventArgs(object entity) {26 public sealed class PluginInfrastructureEventArgs : EventArgs { 27 public object Entity { get; private set; } 28 public PluginInfrastructureEventArgs(object entity) { 29 29 this.Entity = entity; 30 30 } 31 31 32 32 private static PluginInfrastructureEventArgs emptyArgs = new PluginInfrastructureEventArgs(string.Empty); 33 internalnew static PluginInfrastructureEventArgs Empty {33 public new static PluginInfrastructureEventArgs Empty { 34 34 get { return emptyArgs; } 35 35 } -
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginManager.cs
r4068 r4414 31 31 /// Class to manage different plugins. 32 32 /// </summary> 33 internalsealed class PluginManager : MarshalByRefObject {34 internalevent EventHandler<PluginInfrastructureEventArgs> PluginLoaded;35 internalevent EventHandler<PluginInfrastructureEventArgs> PluginUnloaded;36 internalevent EventHandler<PluginInfrastructureEventArgs> Initializing;37 internalevent EventHandler<PluginInfrastructureEventArgs> Initialized;38 internalevent EventHandler<PluginInfrastructureEventArgs> ApplicationStarting;39 internalevent EventHandler<PluginInfrastructureEventArgs> ApplicationStarted;33 public sealed class PluginManager : MarshalByRefObject { 34 public event EventHandler<PluginInfrastructureEventArgs> PluginLoaded; 35 public event EventHandler<PluginInfrastructureEventArgs> PluginUnloaded; 36 public event EventHandler<PluginInfrastructureEventArgs> Initializing; 37 public event EventHandler<PluginInfrastructureEventArgs> Initialized; 38 public event EventHandler<PluginInfrastructureEventArgs> ApplicationStarting; 39 public event EventHandler<PluginInfrastructureEventArgs> ApplicationStarted; 40 40 41 41 private string pluginDir; … … 45 45 /// Gets all installed plugins. 46 46 /// </summary> 47 internalIEnumerable<PluginDescription> Plugins {47 public IEnumerable<PluginDescription> Plugins { 48 48 get { return plugins; } 49 49 } … … 60 60 private bool initialized; 61 61 62 internalPluginManager(string pluginDir) {62 public PluginManager(string pluginDir) { 63 63 this.pluginDir = pluginDir; 64 64 plugins = new List<PluginDescription>(); … … 70 70 /// Determines installed plugins and checks if all plugins are loadable. 71 71 /// </summary> 72 internalvoid DiscoverAndCheckPlugins() {72 public void DiscoverAndCheckPlugins() { 73 73 OnInitializing(PluginInfrastructureEventArgs.Empty); 74 74 AppDomainSetup setup = AppDomain.CurrentDomain.SetupInformation; -
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Sandboxing/SandboxManager.cs
r4068 r4414 87 87 DefaultApplicationManager applicationManager = 88 88 (DefaultApplicationManager)applicationDomain.CreateInstanceAndUnwrap(applicationManagerType.Assembly.FullName, applicationManagerType.FullName, true, BindingFlags.NonPublic | BindingFlags.Instance, null, null, null, null, null); 89 PluginManager pm = new PluginManager(name); 90 pm.DiscoverAndCheckPlugins(); 89 91 ApplicationDescription[] apps = ApplicationManager.Manager.Applications.Cast<ApplicationDescription>().ToArray(); 90 92 PluginDescription[] plugins = ApplicationManager.Manager.Plugins.Cast<PluginDescription>().ToArray();
Note: See TracChangeset
for help on using the changeset viewer.