internal override async Task <int> RunAsync(CancellationToken cancellationToken) { var context = await Context .WithAzureLogon() .BuildAsync(cancellationToken); var instance = new InstanceName(Instance, ResourceGroup); var rules = new AggregatorRules(context.Azure, context.Logger); bool ok = await rules.UpdateAsync(instance, Name, File, RequiredVersion, cancellationToken); return(ok ? 0 : 1); }
internal override async Task <int> RunAsync(CancellationToken cancellationToken) { var context = await Context .WithAzureLogon() .BuildAsync(cancellationToken); var instance = context.Naming.Instance(Instance, ResourceGroup); var rules = new AggregatorRules(context.Azure, context.Logger); bool ok = await rules.UpdateAsync(instance, Name, File, RequiredVersion, SourceUrl, cancellationToken); return(ok ? ExitCodes.Success : ExitCodes.Failure); }
internal override async Task <int> RunAsync() { var context = await Context .WithAzureLogon() .Build(); var instance = new InstanceName(Instance); var rules = new AggregatorRules(context.Azure, context.Logger); bool ok = false; if (Disable || Enable) { ok = await rules.EnableAsync(instance, Name, Disable); } if (!string.IsNullOrEmpty(Update)) { ok = await rules.UpdateAsync(instance, Name, Update); } return(ok ? 0 : 1); }