public static IBotClient GetBotClient(string secretOrToken) { switch (BotClientSettings.ClientType) { case BotClientType.Default: return(new DefaultBotClient(secretOrToken)); case BotClientType.Custom: if (BotClientSettings.CustomBotClientFactoryMethod == null) { throw new InvalidOperationException("Custom bot client selected but one hasn't been set"); } return(BotClientSettings.CustomBotClientFactoryMethod(secretOrToken)); default: throw new ArgumentOutOfRangeException(); } }
public DefaultBotClient(IDirectLineClient directLineClient, BotClientSettings settings, ILogger <DefaultBotClient> logger) { _settings = settings; _directLineClient = directLineClient; _logger = logger; }