Free cookie consent management tool by TermsFeed Policy Generator

Changeset 962


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

Added job adapter to service locator (#372)

Location:
trunk/sources/HeuristicLab.Hive.Server.Core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.Core/InternalInterfaces/DataAccess/IJobAdapter.cs

    r961 r962  
    2727
    2828namespace HeuristicLab.Hive.Server.Core.InternalInterfaces.DataAccess {
    29   interface IJobAdapter {
     29  public interface IJobAdapter {
    3030    /// <summary>
    3131    /// Save or update the job
  • 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.