Beispiel #1
0
            public Task <int> Execute(ConfigOptions configOptions)
            {
                _kernel.Bind <ConfigWorkflow>().ToSelf().InSingletonScope();
                _kernel.Bind <ScgOptionsRepository>().ToSelf().InSingletonScope();

                return(_kernel.Get <ConfigWorkflow>().Run(configOptions));
            }
Beispiel #2
0
 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.")
     });
Beispiel #3
0
        public static Task <int> Run(ConfigOptions configOptions)
        {
            var bootstrapper = new Bootstrapper();

            return(bootstrapper.Execute(configOptions));
        }