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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2924_DotNetCoreMigration/HeuristicLab.PluginInfrastructure/3.3/Utils/UniPath.cs

    r16984 r17013  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.IO;
     1using System.IO;
    42using System.Runtime.InteropServices;
    5 using System.Text;
    63using System.Text.RegularExpressions;
     4using HEAL.Attic;
    75
    86namespace HeuristicLab.PluginInfrastructure {
    9   [Serializable]
     7  [StorableType("8911C8DC-FDA0-4CF6-A0CD-C67E72094D62")]
    108  public class UniPath {
    119
    1210    #region Vars
     11    [Storable]
    1312    private string fullPath = "";
    1413    #endregion
    1514
    1615    #region Constructors
     16    [StorableConstructor]
     17    private UniPath(StorableConstructorFlag _) { }
    1718    public UniPath(string path) {
    1819      fullPath = Path.GetFullPath(path);
    1920    }
    2021    #endregion
    21    
     22
    2223    private bool IsWindowsAbsolutePath(string path) => Regex.IsMatch(path, @"^[A-Z]:");
    23    
     24
    2425    private string Rebuild(char split, string startStr, string seperator) {
    2526      string[] splits = fullPath.Split(split);
    2627      string tmp = startStr;
    2728      int i = 1;
    28       while (i < splits.Length - 1) {
     29      while (i < (splits.Length - 1)) {
    2930        tmp += splits[i] + seperator;
    3031        ++i;
Note: See TracChangeset for help on using the changeset viewer.