public Context(IChatAdapter chatAdapter, IMessage message, IParameterCollection parameterCollection) { _chatAdapter = chatAdapter ?? throw new ArgumentNullException(nameof(chatAdapter)); Message = message ?? throw new ArgumentNullException(nameof(message)); Parameters = parameterCollection ?? throw new ArgumentNullException(nameof(parameterCollection)); }
public IBotBuilder UseAdapter(IChatAdapter chatAdapter) { _chatAdapter = chatAdapter ?? throw new ArgumentNullException(nameof(chatAdapter)); return(this); }
public Bot(IChatAdapter chatAdapter) { _chatAdapter = chatAdapter ?? throw new ArgumentNullException(nameof(chatAdapter)); _chatAdapter.MessageReceived += OnMessageReceived; _listeners = new List <IListener>(); }