예제 #1
0
        static ServiceProvider GetServices(IConfig config, ISpeechServicesAPIv20 sdk)
        {
            var services = new ServiceCollection()
                           .AddSingleton <IConfig>(config)
                           .AddSingleton <ISpeechServicesAPIv20>(sdk)
                           .BuildServiceProvider();

            return(services);
        }
예제 #2
0
        public CommandLineApplication <MainApp> InitApp(ISpeechServicesAPIv20 apiObject)
        {
            var services = new ServiceCollection()
                           .AddSingleton <IConfig, Config>()
                           .AddSingleton <ISpeechServicesAPIv20>(apiObject)
                           .BuildServiceProvider();

            var writer = new MockTestWriter();
            var app    = new CommandLineApplication <MainApp>(new MockConsole(writer));

            app.Conventions.UseDefaultConventions().UseConstructorInjection(services);

            return(app);
        }
예제 #3
0
 public SpeechCommandBase(ISpeechServicesAPIv20 speechApi, IConsole console, IConfig config)
 {
     _speechApi = speechApi;
     _console   = console;
     _config    = config;
 }
예제 #4
0
 public EndpointCommand(ISpeechServicesAPIv20 speechApi, IConsole console) : base(speechApi, console, null)
 {
 }
예제 #5
0
 public TranscriptCommand(ISpeechServicesAPIv20 speechApi, IConsole console, IConfig config) : base(speechApi, console, config)
 {
 }