public AzureSubCommand() { this.Name = "azure"; this.HelpOption(true); this.UsePagerForHelpText = false; CommandOption functionAppName = this.Option("-f | --functionAppName", "FunctionAppName used to deploy", CommandOptionType.SingleValue); this.OnExecute(() => { IHostingProvider hostingProvider = HostingProviderFactory.GetProvider("azure"); if (hostingProvider != null) { Dictionary <string, string> deploymentOptions = new Dictionary <string, string>(); if (functionAppName.HasValue()) { deploymentOptions.Add("functionAppName", functionAppName.Value()); } bool success = hostingProvider.Deploy(deploymentOptions); } }); }
public FileHostingClient(IHostingProvider hostingProvider) { this.hostingProvider = hostingProvider; successes = new ConsoleMultifileProgressProvider(true, "success: "); failures = new ConsoleMultifileProgressProvider(false, "fail on: "); dirListVisuzlizer = new ConsoleTableVisualizer(new[] { ConsoleColor.Cyan, ConsoleColor.Red, ConsoleColor.Yellow }, new[] { -1, 10, 10 }, 0); }
public static IHostingProvider GetProvider(string providerName) { IHostingProvider provider = providerName switch { "aws" => (IHostingProvider) new AWSProvider(), "azure" => (IHostingProvider) new AzureProvider(), "gcp" => (IHostingProvider) new GCPProvider(), _ => null }; return(provider); } }
public AWSSubCommand() { this.Name = "aws"; this.HelpOption(true); this.UsePagerForHelpText = false; this.OnExecute(() => { IHostingProvider hostingProvider = HostingProviderFactory.GetProvider("aws"); if (hostingProvider != null) { bool success = hostingProvider.Deploy(null); } }); }
public GetConfigurationAction(IHostingProvider hostingProvider, IConfigurationService configurationService) { _hostingProvider = hostingProvider; _configurationService = configurationService; }
public GetConfigurationAction(IHostingProvider hostingProvider) { _hostingProvider = hostingProvider; }