Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
        /// <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;
        }
Exemplo n.º 3
0
 public FileComponent(ISobaScript soba, IExer exer)
     : this(soba, null, exer)
 {
 }
Exemplo n.º 4
0
 public InternalComponent(ISobaScript soba, IEnvironment env, IExer exer)
     : base(soba)
 {
     this.env = env ?? throw new ArgumentNullException(nameof(env));
     Exer     = exer;
 }