- Timestamp:
- 11/28/12 10:02:01 (12 years ago)
- Location:
- branches/OaaS/HeuristicLab.Services.Optimization.Controller
- Files:
-
- 9 added
- 5 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj
r8817 r8958 130 130 <HintPath>..\bin\HeuristicLab.Tracing-3.3.dll</HintPath> 131 131 </Reference> 132 <Reference Include="Microsoft.WindowsAzure.CloudDrive, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> 133 <Reference Include="Microsoft.WindowsAzure.Configuration, Version=1.7.0.0, Culture=neutral, processorArchitecture=MSIL" /> 134 <Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> 135 <Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> 136 <Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> 132 137 <Reference Include="System" /> 133 138 <Reference Include="System.configuration" /> 134 139 <Reference Include="System.Core" /> 140 <Reference Include="System.Data.Services.Client" /> 135 141 <Reference Include="System.Runtime.Serialization" /> 136 142 <Reference Include="System.ServiceModel" /> … … 142 148 </ItemGroup> 143 149 <ItemGroup> 144 <Compile Include="HiveScenarioManagerOld.cs" /> 145 <Compile Include="HiveMapper.cs" /> 146 <Compile Include="HiveScenarioManager.cs" /> 147 <Compile Include="HLMapper.cs" /> 150 <Compile Include="Azure\DAL.cs" /> 151 <Compile Include="HL\HiveScenarioManagerOld.cs" /> 152 <Compile Include="HL\HiveMapper.cs" /> 153 <Compile Include="HL\HiveScenarioManager.cs" /> 154 <Compile Include="HL\HLMapper.cs" /> 148 155 <Compile Include="Interfaces\IControllerService.cs" /> 156 <Compile Include="Interfaces\DAL.cs" /> 149 157 <Compile Include="Interfaces\IScenarioManager.cs" /> 150 158 <Compile Include="Model\ControllerModel.cs" /> 151 159 <Compile Include="PlaceholderControllerService.cs" /> 152 160 <Compile Include="Properties\AssemblyInfo.cs" /> 153 <Compile Include=" ScenarioParser.cs" />161 <Compile Include="HL\ScenarioParser.cs" /> 154 162 <Compile Include="Utility.cs" /> 155 163 </ItemGroup> … … 157 165 <WCFMetadata Include="Service References\" /> 158 166 </ItemGroup> 167 <ItemGroup /> 159 168 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 160 169 <PropertyGroup> -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs
r8545 r8958 12 12 [OperationContract] 13 13 IEnumerable<OptimizationScenario> GetOptimizationScenarios(); 14 15 [OperationContract] 16 IEnumerable<string> GetOptimizationScenarioNames(); 14 17 15 18 [OperationContract] … … 30 33 [OperationContract] 31 34 IList<Model.Run> GetJobResults(User user, string id); 35 36 [OperationContract] 37 bool AddHiveScenario(User user, string scenarioXml, string scenarioMapper); 38 39 [OperationContract] 40 bool DeleteHiveScenario(User user, string scenarioName); 32 41 } 33 42 } -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IScenarioManager.cs
r8545 r8958 12 12 void DeleteJob(User user, string id); 13 13 IList<Model.Run> GetJobResults(User user, string id); 14 bool AddScenario(User user, string scenarioName, string scenarioXml, string scenarioMapper); 15 bool DeleteScenario(User user, string scenarioName); 14 16 } 15 17 } -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/PlaceholderControllerService.cs
r8817 r8958 62 62 63 63 public Model.OptimizationScenario GetOptimizationScenarioByName(string name) { 64 if (scenarios[0].Name == name) 65 return scenarios[0]; 66 return null; 64 var scen = (from e in scenarios 65 where e.Name == name 66 select e).FirstOrDefault(); 67 return scen; 67 68 } 68 69 … … 89 90 return hiveManager.GetJobResults(user, id); 90 91 } 92 93 94 public bool AddHiveScenario(User user, string scenarioXml, string scenarioMapper) { 95 var scenario = parser.ParseScenarioFromXml(scenarioXml); 96 if (scenario == null) { 97 return false; 98 } 99 var added = hiveManager.AddScenario(user, scenario.Name, scenarioXml, scenarioMapper); 100 if (added) 101 scenarios.Add(scenario); 102 return added; 103 } 104 105 public bool DeleteHiveScenario(User user, string scenarioName) { 106 var scen = GetOptimizationScenarioByName(scenarioName); 107 if (scen != null) { 108 scenarios.Remove(scen); 109 return hiveManager.DeleteScenario(user, scenarioName); 110 } 111 return false; 112 } 113 114 public IEnumerable<string> GetOptimizationScenarioNames() { 115 return (from e in scenarios 116 select e.Name).AsEnumerable(); 117 } 91 118 } 92 119 }
Note: See TracChangeset
for help on using the changeset viewer.