- Timestamp:
- 06/17/13 10:51:42 (12 years ago)
- Location:
- branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/HiveOperationContext.cs
r9444 r9634 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 33 33 public static HiveOperationContext Current { 34 34 get { 35 return OperationContext.Current.Extensions.Find<HiveOperationContext>(); 35 return OperationContext.Current != null 36 ? OperationContext.Current.Extensions.Find<HiveOperationContext>() 37 : null; 36 38 } 37 39 } -
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/Interfaces/IOptimizedHiveDao.cs
r9434 r9634 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 19 19 */ 20 20 #endregion 21 22 21 23 22 using System; … … 50 49 #endregion 51 50 52 #region StateLog Methods53 54 #endregion55 56 #region Job Methods57 58 #endregion59 60 #region JobPermission Methods61 62 #endregion63 64 51 #region Plugin Methods 65 52 Plugin GetPluginById(Guid pluginId); 66 #endregion67 68 #region PluginData Methods69 70 53 #endregion 71 54 … … 79 62 #endregion 80 63 81 #region SlaveGroup Methods82 83 #endregion84 85 64 #region Resource Methods 86 65 IEnumerable<Guid> GetAssignedResourceIds(Guid jobId); 87 66 #endregion 88 89 #region ResourcePermission Methods90 91 #endregion92 93 #region Authorization Methods94 95 #endregion96 97 #region Lifecycle Methods98 99 #endregion100 101 #region Downtime Methods102 #endregion103 104 #region Statistics Methods105 106 #endregion107 108 #region UserPriority Methods109 110 #endregion111 67 } 112 68 } -
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/OptimizedHiveDao.cs
r9485 r9634 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 28 28 namespace HeuristicLab.Services.Hive.DataAccess { 29 29 public class OptimizedHiveDao : IOptimizedHiveDao { 30 private static HiveDataContext Db { get { return HiveOperationContext.Current.DataContext; } } 30 private HiveDataContext Db { get; set; } 31 32 public OptimizedHiveDao(HiveDataContext db) { 33 Db = db; 34 } 31 35 32 36 #region Task Methods … … 181 185 #endregion 182 186 183 #region StateLog Methods184 185 #endregion186 187 #region Job Methods188 189 #endregion190 191 #region JobPermission Methods192 193 #endregion194 195 187 #region Plugin Methods 196 188 public Plugin GetPluginById(Guid pluginId) { … … 203 195 select p 204 196 ); 205 206 #endregion207 208 #region PluginData Methods209 210 197 #endregion 211 198 … … 249 236 #endregion 250 237 251 #region SlaveGroup Methods252 253 #endregion254 255 238 #region Resource Methods 256 239 public IEnumerable<Guid> GetAssignedResourceIds(Guid taskId) { … … 264 247 ); 265 248 #endregion 266 267 #region ResourcePermission Methods268 269 #endregion270 271 #region Authorization Methods272 273 #endregion274 275 #region Lifecycle Methods276 277 #endregion278 279 #region Downtime Methods280 #endregion281 282 #region Statistics Methods283 284 #endregion285 286 #region UserPriority Methods287 288 #endregion289 290 #region Helpers291 292 #endregion293 249 } 294 250 } -
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/ServiceLocator.cs
r9539 r9634 42 42 } 43 43 44 private IOptimizedHiveDao optimizedHiveDao;45 44 public IOptimizedHiveDao OptimizedHiveDao { 46 45 get { 47 if (optimizedHiveDao == null) optimizedHiveDao = new OptimizedHiveDao(); 48 return optimizedHiveDao; 46 var dataContext = HiveOperationContext.Current != null 47 ? HiveOperationContext.Current.DataContext 48 : new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString); 49 return new OptimizedHiveDao(dataContext); 49 50 } 50 51 }
Note: See TracChangeset
for help on using the changeset viewer.