public Task <int> Execute(ConfigOptions configOptions) { _kernel.Bind <ConfigWorkflow>().ToSelf().InSingletonScope(); _kernel.Bind <ScgOptionsRepository>().ToSelf().InSingletonScope(); return(_kernel.Get <ConfigWorkflow>().Run(configOptions)); }
public Task <int> Run(ConfigOptions configOptions) { return(configOptions.Operation switch { "set" => SetOption(configOptions), "get" => GetOption(configOptions), _ => throw new InvalidOperationException("The specified operation is not supported.") });
public static Task <int> Run(ConfigOptions configOptions) { var bootstrapper = new Bootstrapper(); return(bootstrapper.Execute(configOptions)); }