public Mail2BugEngine(Config.InstanceConfig configInstance, MailboxManagerFactory mailboxManagerFactory) { _config = configInstance; Logger.InfoFormat("Initalizing MailboxManager"); _mailboxManager = mailboxManagerFactory.CreateMailboxManager(_config.EmailSettings); Logger.InfoFormat("Initializing WorkItemManager"); _messageProcessingStrategy = new Lazy<IMessageProcessingStrategy>(InitProcessingStrategy); }
public Mail2BugEngine(Config.InstanceConfig configInstance, MailboxManagerFactory mailboxManagerFactory) { _config = configInstance; Logger.InfoFormat("Initalizing MailboxManager"); _mailboxManager = mailboxManagerFactory.CreateMailboxManager(_config.EmailSettings); Logger.InfoFormat("Initializing WorkItemManager"); _messageProcessingStrategy = new Lazy <IMessageProcessingStrategy>(InitProcessingStrategy); }
private static void InitSingleInstance(Config.InstanceConfig instance) { try { Logger.InfoFormat("Initializing engine for instance '{0}'", instance.Name); _instances.Add(new Mail2BugEngine(instance)); Logger.InfoFormat("Finished initialization of engine for instance '{0}'", instance.Name); } catch (Exception ex) { Logger.ErrorFormat("Exception while initializing instance '{0}'\n{1}", instance.Name, ex); } }
public Mail2BugEngine(Config.InstanceConfig configInstance) { _config = configInstance; Logger.InfoFormat("Initalizing MailboxManager"); _mailboxManager = MailboxManagerFactory.CreateMailboxManager(_config.EmailSettings); Logger.InfoFormat("Initializing WorkItemManager"); IWorkItemManager workItemManager; if (configInstance.TfsServerConfig.SimulationMode) { Logger.InfoFormat("Working in simulation mode. Using WorkItemManagerMock"); workItemManager = new WorkItemManagerMock(_config.WorkItemSettings.ConversationIndexFieldName); } else { Logger.InfoFormat("Working in standard mode, using TFSWorkItemManager"); workItemManager = new TFSWorkItemManager(_config); } Logger.InfoFormat("Initializing MessageProcessingStrategy"); _messageProcessingStrategy = new SimpleBugStrategy(_config, workItemManager); }
public TemporaryInstanceRunner(Config.InstanceConfig instanceConfig, MailboxManagerFactory mailboxManagerFactory) { _instanceConfig = instanceConfig; _mailboxManagerFactory = mailboxManagerFactory; Name = instanceConfig.Name; }
public PersistentInstanceRunner(Config.InstanceConfig instanceConfig, MailboxManagerFactory mailboxManagerFactory) { Name = instanceConfig.Name; _engine = new Mail2BugEngine(instanceConfig, mailboxManagerFactory); }
private static Config.InstanceConfig GetConfig() { var config = new Config.InstanceConfig { WorkItemSettings = new Config.WorkItemSettings { Mnemonics = new List<Config.MnemonicDefinition>(), RecipientOverrides = new List<Config.RecipientOverrideDefinition>(), DateBasedOverrides = new List<Config.DateBasedFieldOverrides>() }, EmailSettings = new Config.EmailSettings { ExplicitOverridesRegex = @"###\s*(?<fieldName>[^:]*):\s*(?<value>.*)" } }; return config; }