- Timestamp:
- 05/14/11 16:45:46 (13 years ago)
- Location:
- branches/histogram
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram
-
branches/histogram/HeuristicLab.PluginInfrastructure/3.3/ApplicationManager.cs
r5445 r6195 28 28 /// </summary> 29 29 public static class ApplicationManager { 30 // the singleton instance is initialized to LightweightApplicationManager as long as no other application manager is registered 31 private static IApplicationManager appManager = new LightweightApplicationManager(); 30 // the singleton instance is initialized to LightweightApplicationManager as long as no other application manager is registered 31 private static IApplicationManager appManager; 32 32 33 /// <summary> 33 34 /// Gets the application manager singleton. 34 35 /// </summary> 35 36 public static IApplicationManager Manager { 36 get { return appManager; } 37 get { 38 if (appManager == null) 39 appManager = new LightweightApplicationManager(); 40 return appManager; 41 } 37 42 } 38 43 … … 42 47 /// <param name="manager"></param> 43 48 internal static void RegisterApplicationManager(IApplicationManager manager) { 44 if ( !(appManager is LightweightApplicationManager)) throw new InvalidOperationException("The application manager has already been set.");49 if (appManager != null && !(appManager is LightweightApplicationManager)) throw new InvalidOperationException("The application manager has already been set."); 45 50 else { 46 51 appManager = manager;
Note: See TracChangeset
for help on using the changeset viewer.