Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/ServiceLocator.cs @ 5175

Last change on this file since 5175 was 5095, checked in by cneumuel, 14 years ago

#1233

  • fixed config merge process
  • worked on hive server test setup
File size: 1.4 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Services.Hive.DataAccess;
6
7namespace HeuristicLab.Services.Hive {
8
9  public class ServiceLocator : IServiceLocator {
10    private static IServiceLocator instance;
11    public static IServiceLocator Instance {
12      get {
13        if (instance == null) instance = new ServiceLocator();
14        return instance;
15      }
16      set { instance = value; }
17    }
18
19    private IHiveDao hiveDao;
20    public IHiveDao HiveDao {
21      get {
22        if (hiveDao == null) hiveDao = new HiveDao();
23        return hiveDao;
24      }
25    }
26   
27    private TransactionManager transactionManager;
28    public TransactionManager TransactionManager {
29      get {
30        if (transactionManager == null) transactionManager = new TransactionManager();
31        return transactionManager;
32      }
33    }
34
35    private IAuthorizationManager authorizationManager;
36    public IAuthorizationManager AuthorizationManager {
37      get {
38        if (authorizationManager == null) authorizationManager = new AuthorizationManager();
39        return authorizationManager;
40      }
41    }
42
43    private ILifecycleManager lifecycleManager;
44    public ILifecycleManager LifecycleManager {
45      get {
46        if (lifecycleManager == null) lifecycleManager = new LifecycleManager();
47        return lifecycleManager;
48      }
49    }
50  }
51}
Note: See TracBrowser for help on using the repository browser.