private static ISobaScript RegisterCore(ISobaScript soba) { soba.Register(new TryComponent(soba)); soba.Register(new CommentComponent()); soba.Register(new BoxComponent(soba)); soba.Register(new ConditionComponent(soba)); soba.Register(new UserVariableComponent(soba)); soba.Register(new EvMSBuildComponent(soba)); return(soba); }
public static ISobaScript Configure(ISobaScript soba, IEnvironment env) { if (soba == null) { throw new ArgumentNullException(nameof(soba)); } IEncDetector detector = new EncDetector(); var fc = new FileComponent(soba, detector, new Exer(Settings.WPath, detector)); var zc = new SevenZipComponent(soba, new SzArchiver(), Settings.WPath); var nc = new NuGetComponent(soba, Settings.WPath); Settings._.WorkPathUpdated += (object sender, DataArgs <string> e) => { fc.Exer.BasePath = e.Data; zc.BasePath = e.Data; nc.BasePath = e.Data; }; //NOTE: custom order makes sense for vsSBE soba.Register(new TryComponent(soba)); soba.Register(new CommentComponent()); soba.Register(new BoxComponent(soba)); soba.Register(new ConditionComponent(soba)); soba.Register(new UserVariableComponent(soba)); soba.Register(new OwpComponent(soba, new OwpEnv(env))); soba.Register(new DteComponent(soba, new DteEnv(env))); soba.Register(new InternalComponent(soba, env, fc.Exer)); soba.Register(new EvMSBuildComponent(soba)); soba.Register(new BuildComponent(soba, new BuildEnv(env))); soba.Register(new FunctionComponent(soba)); soba.Register(fc); soba.Register(nc); soba.Register(zc); return(soba); }