using System; using System.Collections.Generic; using System.Linq; using System.Text; using HeuristicLab.Services.Hive.DataAccess; namespace HeuristicLab.Services.Hive { public class ServiceLocator : IServiceLocator { private static IServiceLocator instance; public static IServiceLocator Instance { get { if (instance == null) instance = new ServiceLocator(); return instance; } set { instance = value; } } private IHiveDao hiveDao; public IHiveDao HiveDao { get { if (hiveDao == null) hiveDao = new HiveDao(); return hiveDao; } } private TransactionManager transactionManager; public TransactionManager TransactionManager { get { if (transactionManager == null) transactionManager = new TransactionManager(); return transactionManager; } } private IAuthorizationManager authorizationManager; public IAuthorizationManager AuthorizationManager { get { if (authorizationManager == null) authorizationManager = new AuthorizationManager(); return authorizationManager; } } private ILifecycleManager lifecycleManager; public ILifecycleManager LifecycleManager { get { if (lifecycleManager == null) lifecycleManager = new LifecycleManager(); return lifecycleManager; } } private HeartbeatManager heartbeatManager; public HeartbeatManager HeartbeatManager { get { if(heartbeatManager == null) heartbeatManager = new HeartbeatManager(); return heartbeatManager; } } } }