Changeset 5095 for branches/HeuristicLab.Hive-3.4/sources
- Timestamp:
- 12/13/10 16:09:22 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 7 added
- 2 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources
- Property svn:ignore
-
old new 1 1 HeuristicLab.Hive-3.4.suo 2 2 TestResults 3 HeuristicLab.Hive 3.4.suo
-
- Property svn:ignore
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/PluginClient.cs
r5055 r5095 5 5 using HeuristicLab.Services.Hive.Common.DataTransfer; 6 6 7 namespace HeuristicLab.Clients.Hive .HiveExperiment{7 namespace HeuristicLab.Clients.Hive { 8 8 internal class PluginClient { 9 9 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests
-
Property
svn:ignore
set to
bin
obj
-
Property
svn:ignore
set to
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/HeuristicLab.Services.Hive.Tests-3.4.csproj
r5078 r5095 307 307 </ItemGroup> 308 308 <ItemGroup> 309 <Compile Include="Mocks\MockAuthorizationManager.cs" /> 310 <Compile Include="Mocks\MockLifecycleManager.cs" /> 311 <Compile Include="Mocks\MockServiceLocator.cs" /> 309 312 <Compile Include="PluginLoader.cs" /> 310 313 <Compile Include="Properties\AssemblyInfo.cs" /> … … 312 315 </ItemGroup> 313 316 <ItemGroup> 317 <ProjectReference Include="..\HeuristicLab.Clients.Hive.Slave.Tests\HeuristicLab.Clients.Hive.Slave.Tests-3.4.csproj"> 318 <Project>{C4CBD11E-1B83-464A-B0AD-0DC0FF7E57AA}</Project> 319 <Name>HeuristicLab.Clients.Hive.Slave.Tests-3.4</Name> 320 </ProjectReference> 321 <ProjectReference Include="..\HeuristicLab.Clients.Hive\3.4\HeuristicLab.Clients.Hive-3.4.csproj"> 322 <Project>{B5EF1E5A-9F3D-40B9-B4B0-30AADF2E2CEB}</Project> 323 <Name>HeuristicLab.Clients.Hive-3.4</Name> 324 </ProjectReference> 314 325 <ProjectReference Include="..\HeuristicLab.Hive\3.4\HeuristicLab.Hive-3.4.csproj"> 315 326 <Project>{F98A1740-9AC9-4D36-A582-6A2D0D06978D}</Project> … … 330 341 </ItemGroup> 331 342 <ItemGroup> 332 <Folder Include="Mocks\" /> 343 <None Include="HeuristicLab 3.3.exe.config"> 344 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 345 </None> 333 346 </ItemGroup> 334 347 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/ServerTest.cs
r5078 r5095 4 4 using System.Linq; 5 5 using Microsoft.VisualStudio.TestTools.UnitTesting; 6 using HeuristicLab.Services.Hive.Common.DataTransfer; 7 using HeuristicLab.Services.Hive.Common.ServiceContracts; 8 using HeuristicLab.Clients.Hive.Slave.Tests; 9 using HeuristicLab.Clients.Hive; 6 10 7 11 namespace HeuristicLab.Services.Hive.Tests { … … 12 16 public static void MyClassInitialize(TestContext testContext) { 13 17 PluginLoader.pluginAssemblies.Any(); 18 ServiceLocator.Instance = new MockServiceLocator(ServiceLocator.Instance); 19 } 20 21 private IHiveService GetService() { 22 return new HiveService(); 14 23 } 15 24 16 25 [TestMethod] 17 26 public void TestMethod1() { 27 var service = GetService(); 28 29 Job job = new Job() { 30 CoresNeeded = 1, 31 MemoryNeeded = 0, 32 Priority = 0 33 }; 34 35 JobData jobData = new JobData() { 36 Data = PersistenceUtil.Serialize(new MockJob(500)) 37 }; 38 39 Guid jobId = service.AddJob(job, jobData); 40 41 Job newJob = service.GetJob(jobId); 42 Assert.AreEqual(job, newJob); 18 43 } 19 44 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Web
-
Property
svn:ignore
set to
aspnet_client
-
Property
svn:ignore
set to
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HeuristicLab.Services.Hive-3.4.csproj
r5055 r5095 78 78 <None Include="HeuristicLabServicesHivePlugin.cs.frame" /> 79 79 <None Include="Properties\AssemblyInfo.cs.frame" /> 80 <Compile Include="Interfaces\ILifecycleManager.cs" /> 81 <Compile Include="Interfaces\IServiceLocator.cs" /> 80 82 <Compile Include="Standalone\HeuristicLabServicesHiveApplication.cs" /> 81 83 <Compile Include="Standalone\MainForm.cs"> … … 87 89 <Compile Include="AuthorizationManager.cs" /> 88 90 <Compile Include="HeuristicLabServicesHivePlugin.cs" /> 89 <Compile Include=" Hive.cs" />91 <Compile Include="LifecycleManager.cs" /> 90 92 <Compile Include="HiveRoles.cs" /> 91 93 <Compile Include="HiveService.cs" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs
r5078 r5095 17 17 /// Implementation of the Hive service (interface <see cref="IHiveService"/>). 18 18 /// </summary> 19 [ServiceBehavior(InstanceContextMode=InstanceContextMode.PerCall)] 19 20 public class HiveService : IHiveService { 20 21 private DataAccess.IHiveDao dao { … … 27 28 get { return ServiceLocator.Instance.AuthorizationManager; } 28 29 } 29 private Hive hive{30 get { return ServiceLocator.Instance. Hive; }30 private ILifecycleManager lifecycleManager { 31 get { return ServiceLocator.Instance.LifecycleManager; } 31 32 } 32 33 33 34 #region Job Methods 34 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]35 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]35 //[PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)] 36 //[PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)] 36 37 public Guid AddJob(Job job, JobData jobData) { 37 38 using (trans.OpenTransaction()) { … … 176 177 public List<MessageContainer> Heartbeat(Heartbeat heartbeat) { 177 178 using (trans.OpenTransaction()) { 178 return hive.ProcessHeartbeat(heartbeat);179 return lifecycleManager.ProcessHeartbeat(heartbeat); 179 180 } 180 181 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/ServiceLocator.cs
r5028 r5095 7 7 namespace HeuristicLab.Services.Hive { 8 8 9 public class ServiceLocator {10 private static ServiceLocator instance;11 public static ServiceLocator Instance {9 public class ServiceLocator : IServiceLocator { 10 private static IServiceLocator instance; 11 public static IServiceLocator Instance { 12 12 get { 13 13 if (instance == null) instance = new ServiceLocator(); 14 14 return instance; 15 15 } 16 set { instance = value; } 16 17 } 17 18 … … 40 41 } 41 42 42 private Hive hive;43 public Hive Hive{43 private ILifecycleManager lifecycleManager; 44 public ILifecycleManager LifecycleManager { 44 45 get { 45 if ( hive == null) hive = new Hive();46 return hive;46 if (lifecycleManager == null) lifecycleManager = new LifecycleManager(); 47 return lifecycleManager; 47 48 } 48 49 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/Standalone/HeuristicLabServicesHiveApplication.cs
r5040 r5095 12 12 public class HeuristicLabServicesHiveApplication : ApplicationBase { 13 13 private IDictionary<string, ServiceHost> serviceHosts = new Dictionary<string, ServiceHost>(); 14 private Hive hive { get { return ServiceLocator.Instance.Hive; } }14 private ILifecycleManager lifecycleManager { get { return ServiceLocator.Instance.LifecycleManager; } } 15 15 16 16 public override void Run() { … … 25 25 host.Close(); 26 26 } 27 hive.Shutdown();27 lifecycleManager.Stop(); 28 28 } 29 29 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/app.config
r5078 r5095 57 57 </behaviors> 58 58 <services> 59 <service behaviorConfiguration="ServiceBehaviour_IHiveService" 60 name="HeuristicLab.Services.Hive.HiveService"> 59 <service behaviorConfiguration="ServiceBehaviour_IHiveService" name="HeuristicLab.Services.Hive.HiveService"> 61 60 <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="MexEndpoint" contract="IMetadataExchange" /> 62 61 <endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" name="WSHttpBinding_IHiveService" contract="HeuristicLab.Services.Hive.Common.ServiceContracts.IHiveService" /> -
branches/HeuristicLab.Hive-3.4/sources/MergeConfigs.cmd
r5050 r5095 1 copy "%SolutionDir%HeuristicLab.Hive -3.3.dll.config" "%TargetDir%"1 copy "%SolutionDir%HeuristicLab.Hive 3.4.dll.config" "%TargetDir%" 2 2 3 %SolutionDir%ConfigMerger "%SolutionDir%HeuristicLab.Services.Hive\3. 3\app.config" "%TargetDir%HeuristicLab.Hive-3.3.dll.config"4 %SolutionDir%ConfigMerger "%SolutionDir%HeuristicLab.Services.Hive.DataAccess\3. 3\app.config" "%TargetDir%HeuristicLab.Hive-3.3.dll.config"5 %SolutionDir%ConfigMerger "%SolutionDir%HeuristicLab.Clients.Hive\3. 3\app.config" "%TargetDir%HeuristicLab.Hive-3.3.dll.config"3 %SolutionDir%ConfigMerger "%SolutionDir%HeuristicLab.Services.Hive\3.4\app.config" "%TargetDir%HeuristicLab.Hive 3.4.dll.config" 4 %SolutionDir%ConfigMerger "%SolutionDir%HeuristicLab.Services.Hive.DataAccess\3.4\app.config" "%TargetDir%HeuristicLab.Hive 3.4.dll.config" 5 %SolutionDir%ConfigMerger "%SolutionDir%HeuristicLab.Clients.Hive\3.4\app.config" "%TargetDir%HeuristicLab.Hive 3.4.dll.config" 6 6 7 7 copy "%SolutionDir%HeuristicLab 3.3.exe.config" "%TargetDir%" 8 8 9 %SolutionDir%ConfigMerger "%TargetDir%HeuristicLab.Hive-3.3.dll.config" "%TargetDir%HeuristicLab 3.3.exe.config" 10 copy "%TargetDir%HeuristicLab 3.3.exe.config" "asdf.config" 9 %SolutionDir%ConfigMerger "%TargetDir%HeuristicLab.Hive 3.4.dll.config" "%TargetDir%HeuristicLab 3.3.exe.config" 11 10 copy "%TargetDir%HeuristicLab 3.3.exe.config" "%target%"
Note: See TracChangeset
for help on using the changeset viewer.