Exemplo n.º 1
0
        public async Task ShouldCreateANewClient()
        {
            IThreadClientFactory factory = ThreadClientFactory.Create();
            IThreadClient        client  = await factory.CreateClientAsync();

            Assert.IsNotNull(client);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create a new client instance that implement <see cref="IThreadClient"/> interface.
        /// </summary>
        /// <returns>A instance of a client with implements <see cref="IThreadClient"/></returns>
        public Task <IThreadClient> CreateClientAsync()
        {
            IThreadClient threadClient = serviceProvider.GetRequiredService <IThreadClient>();

            return(Task.FromResult(threadClient));
        }