Ignore:
Timestamp:
12/11/08 15:21:38 (12 years ago)
Author:
svonolfe
Message:

Added job adapter to service locator (#372)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.Core/ServiceLocator.cs

    r948 r962  
    4545
    4646  private static IPermissionOwnerAdapter permOwnerAdapter = null;
     47
     48  private static IJobAdapter jobAdapter = null;
    4749
    4850  /// <summary>
     
    136138    return permOwnerAdapter;
    137139  }
     140
     141  /// <summary>
     142  /// Gets the job database adapter
     143  /// </summary>
     144  /// <returns></returns>
     145  [MethodImpl(MethodImplOptions.Synchronized)]
     146  public static IJobAdapter GetJobAdapter() {
     147    if (jobAdapter == null) {
     148      jobAdapter = discoveryService.GetInstances<IJobAdapter>()[0];
     149    }
     150
     151    return jobAdapter;
     152  }
    138153}
Note: See TracChangeset for help on using the changeset viewer.