Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/13/15 16:19:51 (9 years ago)
Author:
ascheibe
Message:

#2388 removed old code and switched to new code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/ServiceLocator.cs

    r12857 r12861  
    2626
    2727namespace HeuristicLab.Services.Hive {
    28 
    2928  public class ServiceLocator : IServiceLocator {
    3029    private static IServiceLocator instance;
     
    4342                            : new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
    4443        return new PersistenceManager(dataContext);
    45       }
    46     }
    47 
    48     private IHiveDao hiveDao;
    49     public IHiveDao HiveDao {
    50       get {
    51         if (hiveDao == null) hiveDao = new HiveDao();
    52         return hiveDao;
    53       }
    54     }
    55 
    56     public IOptimizedHiveDao OptimizedHiveDao {
    57       get {
    58         var dataContext = HiveOperationContext.Current != null
    59                             ? HiveOperationContext.Current.DataContext
    60                             : new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
    61         return new OptimizedHiveDao(dataContext);
    6244      }
    6345    }
     
    8264    public IEventManager EventManager {
    8365      get {
    84         if (eventManager == null) eventManager = new NewEventManager();
     66        if (eventManager == null) eventManager = new EventManager();
    8567        return eventManager;
    8668      }
     
    9274    }
    9375
    94     private ITransactionManager transactionManager;
    95     public ITransactionManager TransactionManager {
    96       get {
    97         if (transactionManager == null) transactionManager = new TransactionManager();
    98         return transactionManager;
    99       }
    100     }
    101 
    10276    private Access.IUserManager userManager;
    10377    public Access.IUserManager UserManager {
     
    10579        if (userManager == null) userManager = new Access.UserManager();
    10680        return userManager;
    107       }
    108     }
    109 
    110     private NewHeartbeatManager newheartbeatManager;
    111     public NewHeartbeatManager NewHeartbeatManager {
    112       get {
    113         if (newheartbeatManager == null) newheartbeatManager = new NewHeartbeatManager();
    114         return newheartbeatManager;
    11581      }
    11682    }
     
    13197      }
    13298    }
    133 
    134     private ITaskScheduler newtaskScheduler;
    135     public ITaskScheduler NewTaskScheduler {
    136       get {
    137         if (newtaskScheduler == null) newtaskScheduler = new RoundRobinTaskScheduler();
    138         return newtaskScheduler;
    139       }
    140     }
    14199  }
    142100}
Note: See TracChangeset for help on using the changeset viewer.