Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/17/19 10:40:41 (5 years ago)
Author:
dpiringe
Message:

#2924:

  • some changes in CLIApplication.cs to reduce unnecessary allocation of string objects
  • renamed AppTest to ConsoleOptimizer and fixed race condition
  • replaced enum RunnerJob with class RunnerMessage for more control of saved data
  • changed usage of BinaryFormatter with HEAL.Attic, following types are now Storable:
    • ConsoleOptimizer
    • InspectApplication
    • ApplicationBase
    • ApplicationRunner
    • AssemblyInfo
    • Runner
    • UniPath
    • RunnerMessage
  • switched QuietMode from ApplicationRunner to IRunner
  • DockerRunnerHost can now automatically build docker images for linux and windows containers (also identifies which container type is active) -> removes the condition to have the image preinstalled
    • to achieve this, there are two new folders DockerLinuxBuild and DockerWindowsBuild included in build output, which include Dockerfiles to build images for linux and windows container
  • added NuGet package System.CodeDom to project HeuristicLab.Scripting-3.3
  • added method Send(RunnerMessage) to IRunnerHost and transferred methods Pause and Resume to IRunner
  • added internal reference of RunnerHost in Runner
  • added abstract method SendMessage(RunnerMessage) in RunnerHost which gets called from method Send(RunnerMessage)
  • because of a Google.Protobuf "bug", RunnerMessages cannot get serialized/deserialized directly on stream -> workaround with a byte array, which gets written and read
    • additionally, the length of the array gets sent first (length as integer -> 4 bytes)
    • static method in RunnerMessage to read a message from a stream
    • the method SendMessage(RunnerMessage) in RunnerHost implements this functionality
Location:
branches/2924_DotNetCoreMigration/HeuristicLab/3.3
Files:
4 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2924_DotNetCoreMigration/HeuristicLab/3.3/ApplicationCommand.cs

    r16998 r17013  
    4040    private void StartupRunnerHost() {
    4141      Stream stdin = Console.OpenStandardInput();
    42       IRunner runner = Runner.Deserialize(stdin);
     42      var message = (TransportRunnerMessage)RunnerMessage.ReadMessageFromStream(stdin);
     43      IRunner runner = message.Runner;
    4344
    4445      if (runner != null)
  • branches/2924_DotNetCoreMigration/HeuristicLab/3.3/HeuristicLab-3.3.csproj

    r16998 r17013  
    2222
    2323  <ItemGroup>
     24    <PackageReference Include="Google.Protobuf" Version="3.6.1" />
    2425    <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.7.9" />
    2526  </ItemGroup>
     
    3132    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj" />
    3233  </ItemGroup>
     34
     35  <ItemGroup>
     36    <Reference Include="HEAL.Attic">
     37      <HintPath>..\..\bin\HEAL.Attic.dll</HintPath>
     38    </Reference>
     39  </ItemGroup>
     40
     41  <ItemGroup>
     42    <None Include="$(SolutionDir)\HeuristicLab\3.3\DockerWindowsBuild\**" CopyToOutputDirectory="Always" LinkBase="DockerWindowsBuild\" />
     43    <None Include="$(SolutionDir)\HeuristicLab\3.3\DockerLinuxBuild\**" CopyToOutputDirectory="Always" LinkBase="DockerLinuxBuild\" />
     44  </ItemGroup>
     45
    3346</Project>
  • branches/2924_DotNetCoreMigration/HeuristicLab/3.3/InspectCommand.cs

    r16998 r17013  
    1616
    1717      if (Settings.Host != null) {
     18        Settings.Host.QuietMode = false;
    1819        Settings.Host.Run(new ApplicationRunner() {
    19           QuietMode = false,
    2020          AssembliesToLoad = Settings.assemblyInfos,
    2121          StartApplication =
  • branches/2924_DotNetCoreMigration/HeuristicLab/3.3/OptimizeCommand.cs

    r16998 r17013  
    2121      if (Output != null && !Directory.Exists(Output))
    2222        throw new DirectoryNotFoundException("Output directory does not exist!");
    23 
    2423      if (Settings.Host != null) {
    25         Settings.Host.Run(new ApplicationRunner() {
    26           QuietMode = Quiet,
     24        Settings.Host.QuietMode = Quiet;
     25        IRunner runner = new ApplicationRunner() {
    2726          AssembliesToLoad = Settings.assemblyInfos,
    2827          StartApplication =
     
    3231            ).Where(x => x.Name.Equals("CLIOptimize"))
    3332             .First()
    34         });
     33        };
     34        Settings.Host.Run(runner);
    3535      }
    3636    }
Note: See TracChangeset for help on using the changeset viewer.