kenakamu/LINEChannelConnector

May I use DI change ConnectorClient to LINEConnectorClient?

rainmakerho opened this issue · 2 comments

Hi @kenakamu ,
The LineMiddleware convert incoming LINE request to BotBuilder Activity.
The LINEAdapterMiddleware convert outgoing BotBuilder Activity to LINE.
May I use DI change ConnectorClient to LINEConnectorClient?

services.AddTransient<IConnectorClient, LineConnectorClient>();

Sure thing. Using DI is actually better for testing anyway :)

Hi @kenakamu ,
I have a question about use DI to replace ConnectorClient.
I saw BotFrameworkAdapter.cs using �connectorClient wasn't using DI.
It's creating ConnectorClient directly.

connectorClient = new ConnectorClient(new Uri(serviceUrl), appCredentials);

Is there any way to use DI change ConnectorClient to LINEConnectorClient?
Thank you.