public CollectCmd(AppCfg cfg, PipeAppCtx appCtx, PipeAppCfg pipeAppCfg, IPipeCtx pipeCtx) { Cfg = cfg; AppCtx = appCtx; PipeAppCfg = pipeAppCfg; PipeCtx = pipeCtx; }
public PipeAppCtx(PipeAppCtx appCtx) { Scope = appCtx.Scope; Assemblies = appCtx.Assemblies; EnvironmentVariables = appCtx.EnvironmentVariables; CustomRegion = appCtx.CustomRegion; }
public FuncCtx(ILogger log, PipeAppCtx pipeCtx, RootCfg root, AppCfg cfg, ILifetimeScope scope) { Log = log; PipeCtx = pipeCtx; Root = root; Cfg = cfg; Scope = scope; }
public async ValueTask ExecuteAsync(IConsole console) { var channels = ChannelIds?.UnJoin('|').ToArray(); // make a new app context with a custom region defined var appCtx = new PipeAppCtx(AppCtx) { CustomRegion = () => Rand.Choice(Regions) }; // run the work using the pipe entry point, forced to be local PipeAppCfg.Location = PipeRunLocation.Local; var pipeCtx = new PipeCtx(PipeAppCfg, appCtx, PipeCtx.Store, PipeCtx.Log); await pipeCtx.Run((YtCollector d) => d.Collect(PipeArg.Inject <ILogger>(), ForceUpdate, false, channels, PipeArg.Inject <CancellationToken>())); }