Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/14/11 16:45:46 (13 years ago)
Author:
abeham
Message:

#1465

  • updated branch with latest version of trunk
Location:
branches/histogram
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/histogram

  • branches/histogram/HeuristicLab.PluginInfrastructure/3.3/ApplicationManager.cs

    r5445 r6195  
    2828  /// </summary>
    2929  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
    3233    /// <summary>
    3334    /// Gets the application manager singleton.
    3435    /// </summary>
    3536    public static IApplicationManager Manager {
    36       get { return appManager; }
     37      get {
     38        if (appManager == null)
     39          appManager = new LightweightApplicationManager();
     40        return appManager;
     41      }
    3742    }
    3843
     
    4247    /// <param name="manager"></param>
    4348    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.");
    4550      else {
    4651        appManager = manager;
Note: See TracChangeset for help on using the changeset viewer.