My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
namespace sidepop.runners
{
using System.Collections.Generic;
using configuration;
using infrastructure;
using infrastructure.logging;
using Mail;

public class SidePopXmlConfigurator : EmailWatcherConfigurator
{
public IEnumerable<EmailWatcher> configure()
{
return configure_mail_watchers();
}

private IEnumerable<EmailWatcher> configure_mail_watchers()
{
IList<EmailWatcher> watchers = new List<EmailWatcher>();

foreach (AccountConfigurationElement account in SidePOPConfiguration.settings.accounts)
{
if (account.enabled)
{
watchers.Add(
new SidePopEmailWatcher(
new DefaultPop3Client(
account.hostName, account.hostPort,
account.useSSL, account.userName,
account.password,account.timeout_in_minutes)
, account.minutes_between_checks)
);
Log.bound_to(this).log_an_info_event_containing("{0} is configured to watch for messages with user {1} at {2} every {3} minutes.", ApplicationParameters.name,
account.userName, account.hostName, account.minutes_between_checks);
}
}

return watchers;
}

}
}

Change log

r29 by ferventcoder on Dec 10, 2009   Diff
Renaming the SidePopRunner to
SidePopEmailWatcher. Adding an integration
test suite and starting to look at emails
coming into the system to ensure we have
probection against any anomolies
Go to: 
Project members, sign in to write a code review

Older revisions

r13 by ferventcoder on Dec 8, 2009   Diff
renaming SidePopRunnerXmlConfigurator
to SidePopXmlConfigurator
r12 by ferventcoder on Dec 8, 2009   Diff
Adding an XMLConfigurator. Changing
Runner to EmailWatcher
All revisions of this file

File info

Size: 1592 bytes, 41 lines
Powered by Google Project Hosting