Skip to content
Jonathan Starnes edited this page Sep 17, 2013 · 1 revision

An adapter is an interface for nbot to communicate with some any combination of input and output. This interface is a wrapper around the input (IMessageProducer) and the output (IMessageClient). When a message is produced by the producer and is handled by a message handler the message client that is passed to the handler will be the same client provided in this interface. It is not required that the producer and client are the same endpoint, for example the producer could be a feed from twitter, but the client could be a campfire room. This allows for interesting combinations of producers and clients.

    public interface IAdapter
    {
        IMessageProducer Producer { get; }
        IMessageClient Client { get; }
    }