Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/29/19 12:16:15 (5 years ago)
Author:
dpiringe
Message:

#2924:

  • added IEnumerable<T> GetInstances<T>(params object[] args) where T: class and IEnumerable<object> GetInstances(Type type, params object[] args) method to IApplicationManager and implemented them in LightweightApplicationManager -> to instantiate types with specific constructor arguments
  • added RunnerState State { get; } property in IRunnerHost, was already in RunnerHost
  • added user authentication for NativeRunnerHost
  • added optional check for a running docker daemon and available image for type DockerRunnerHost + Exception DockerException
  • added caching of the saved IApplication in ApplicationRunner to prevent a new instance every get call
  • removed System.ServiceModel.Primitives NuGet package
  • lots of formatting
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2924_DotNetCoreMigration/HeuristicLab.PluginInfrastructure/3.3/Isolation/Runner.cs

    r16984 r16993  
    44using System.Runtime.Serialization;
    55using System.Runtime.Serialization.Formatters.Binary;
    6 using System.Text;
    76using System.Threading;
    87
     
    1110  public abstract class Runner : IRunner {
    1211
     12    #region Vars
    1313    [NonSerialized]
    1414    private Thread listener;
     
    1919    [NonSerialized]
    2020    protected static IFormatter formatter = new BinaryFormatter();
    21    
     21    #endregion
     22
     23    #region Properties
    2224    public bool QuietMode { get; set; }
    23      
     25
    2426    public IEnumerable<AssemblyInfo> AssembliesToLoad { get; set; }
     27    #endregion
     28
    2529
    2630    public static void Serialize(IRunner runner, Stream stream) => formatter.Serialize(stream, runner);
     
    4145    protected abstract void OnRunnerJob(RunnerJob runnerJob);
    4246
     47    #region Helper
    4348    private void StartExecutor() {
    4449      executor = new Thread(Execute);
     
    4651      executor.Start();
    4752    }
     53
    4854    private void StartListener() {
    4955      listener = new Thread(() => {
    5056        Stream stdin = Console.OpenStandardInput();
    51         while (executor.IsAlive) 
     57        while (executor.IsAlive)
    5258          OnRunnerJob((RunnerJob)formatter.Deserialize(stdin));
    5359      });
     
    5561      listener.Start();
    5662    }
    57 
     63    #endregion
    5864  }
    5965}
Note: See TracChangeset for help on using the changeset viewer.