SidePOP XMLConfigurator

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.

Print | posted @ Tuesday, December 08, 2009 1:29 PM

Comments on this entry:

No comments posted yet.

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: