Changeset 12861 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/ServiceLocator.cs
- Timestamp:
- 08/13/15 16:19:51 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/ServiceLocator.cs
r12857 r12861 26 26 27 27 namespace HeuristicLab.Services.Hive { 28 29 28 public class ServiceLocator : IServiceLocator { 30 29 private static IServiceLocator instance; … … 43 42 : new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString); 44 43 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 != null59 ? HiveOperationContext.Current.DataContext60 : new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);61 return new OptimizedHiveDao(dataContext);62 44 } 63 45 } … … 82 64 public IEventManager EventManager { 83 65 get { 84 if (eventManager == null) eventManager = new NewEventManager();66 if (eventManager == null) eventManager = new EventManager(); 85 67 return eventManager; 86 68 } … … 92 74 } 93 75 94 private ITransactionManager transactionManager;95 public ITransactionManager TransactionManager {96 get {97 if (transactionManager == null) transactionManager = new TransactionManager();98 return transactionManager;99 }100 }101 102 76 private Access.IUserManager userManager; 103 77 public Access.IUserManager UserManager { … … 105 79 if (userManager == null) userManager = new Access.UserManager(); 106 80 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;115 81 } 116 82 } … … 131 97 } 132 98 } 133 134 private ITaskScheduler newtaskScheduler;135 public ITaskScheduler NewTaskScheduler {136 get {137 if (newtaskScheduler == null) newtaskScheduler = new RoundRobinTaskScheduler();138 return newtaskScheduler;139 }140 }141 99 } 142 100 }
Note: See TracChangeset
for help on using the changeset viewer.