public FileComponent(ISobaScript soba, IEncDetector detector, IExer exer) : base(soba) { EncDetector = detector; Exer = exer ?? throw new ArgumentNullException(nameof(exer)); _envPath = new Lazy <IEnumerable <string> >(() => GetEnvPath(EnvironmentVariableTarget.Process)); }
/// <param name="cmd"></param> protected Action(ICommand cmd) { this.cmd = cmd; if (Bootloader._?.Soba.GetComponent(typeof(FileComponent)) is FileComponent fc) { exer = fc.Exer; return; } Log.Trace("Use new Exer instead of FileComponent"); exer = new Exer(Settings.WPath, new EncDetector()); Settings._.WorkPathUpdated += (object sender, DataArgs <string> e) => exer.BasePath = e.Data; }
public FileComponent(ISobaScript soba, IExer exer) : this(soba, null, exer) { }
public InternalComponent(ISobaScript soba, IEnvironment env, IExer exer) : base(soba) { this.env = env ?? throw new ArgumentNullException(nameof(env)); Exer = exer; }