Ejemplo n.º 1
0
        protected async void UseClientFor(Func <ILUISAuthoringClient, Task> doTest, Type typeName = null, [CallerMemberName] string methodName = "")
        {
            using (MockContext context = MockContext.Start(typeName ?? TypeName, methodName))
            {
                HttpMockServer.Initialize(typeName ?? TypeName, methodName, mode);
                ILUISAuthoringClient client = GetClient(HttpMockServer.CreateInstance());

                await doTest(client);

                context.Stop();
            }
        }
Ejemplo n.º 2
0
        public LuisService(IOptions <LuisSettings> options,
                           ILUISAuthoringClient luisAuthoringClient,
                           ILUISRuntimeClient luisRuntimeClient,
                           IRedisCacheService redisCache,
                           HttpClient httpClient,
                           ILogger <LuisService> logger)
        {
            _redisCache   = redisCache;
            _luisSettings = options?.Value ?? throw new ArgumentNullException(nameof(options));
            _logger       = logger;
            _httpClient   = httpClient;

            _luisRuntimeClient   = luisRuntimeClient;
            _luisAuthoringClient = luisAuthoringClient;
        }