Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/04/10 18:55:46 (14 years ago)
Author:
gkronber
Message:

Fixed projects to work with new plugin infrastructure. #799

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PluginInfrastructure Refactoring/HeuristicLab.Hive.Server.Core/3.2/ServiceLocator.cs

    r1768 r2587  
    2020#endregion
    2121
     22using System.Linq;
    2223using HeuristicLab.Hive.Server.DataAccess;
    2324using HeuristicLab.PluginInfrastructure;
     
    3435/// </summary>
    3536public class ServiceLocator {
    36   private static DiscoveryService discoveryService =
    37     new DiscoveryService();
    38 
    3937  private static IClientManager clientManager = null;
    4038
     
    109107    if (sessionFactory == null) {
    110108      sessionFactory =
    111         discoveryService.GetInstances<ISessionFactory>()[0];
     109        ApplicationManager.Manager.GetInstances<ISessionFactory>().First();
    112110
    113111      sessionFactory.DbConnectionType =
     
    128126  public static IScheduler GetScheduler() {
    129127    if (scheduler == null) {
    130       scheduler = discoveryService.GetInstances<IScheduler>()[0];
     128      scheduler = ApplicationManager.Manager.GetInstances<IScheduler>().First();
    131129    }
    132130
     
    141139  public static IPermissionManager GetPermissionManager() {
    142140    if (permManager == null)
    143       permManager = discoveryService.GetInstances<IPermissionManager>()[0];
     141      permManager = ApplicationManager.Manager.GetInstances<IPermissionManager>().First();
    144142    return permManager;
    145143   
     
    153151  public static IHivePermissionManager GetHivePermissionManager() {
    154152    if (hivePermManager == null)
    155       hivePermManager = discoveryService.GetInstances<IHivePermissionManager>()[0];
     153      hivePermManager = ApplicationManager.Manager.GetInstances<IHivePermissionManager>().First();
    156154    return hivePermManager;
    157155
Note: See TracChangeset for help on using the changeset viewer.