From my previous post on SidePOP, I wanted to make it even easier to configure SidePOP.
So instead of the configure_mail_watcher() from the last post, this is what it looks like now:
private void configure_mail_watcher()
{
EmailWatcherConfigurator configurator = new SidePopXmlConfigurator();
foreach (EmailWatcher emailWatcher in configurator.configure())
{
emailWatcher.MessagesReceived += runner_messages_received;
emailWatcher.start();
}
}
Pretty.
Notice that Runner became EmailWatcher and instead of run() we start(). In conjunction there is also a stop() method as well.