Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 5062 was 5028, checked in by cneumuel, 14 years ago

#1233 cleanup

File size: 1.3 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 {
10    private static ServiceLocator instance;
11    public static ServiceLocator Instance {
12      get {
13        if (instance == null) instance = new ServiceLocator();
14        return instance;
15      }
16    }
17
18    private IHiveDao hiveDao;
19    public IHiveDao HiveDao {
20      get {
21        if (hiveDao == null) hiveDao = new HiveDao();
22        return hiveDao;
23      }
24    }
25   
26    private TransactionManager transactionManager;
27    public TransactionManager TransactionManager {
28      get {
29        if (transactionManager == null) transactionManager = new TransactionManager();
30        return transactionManager;
31      }
32    }
33
34    private IAuthorizationManager authorizationManager;
35    public IAuthorizationManager AuthorizationManager {
36      get {
37        if (authorizationManager == null) authorizationManager = new AuthorizationManager();
38        return authorizationManager;
39      }
40    }
41
42    private Hive hive;
43    public Hive Hive {
44      get {
45        if (hive == null) hive = new Hive();
46        return hive;
47      }
48    }
49  }
50}
Note: See TracBrowser for help on using the repository browser.