Ejemplo n.º 1
0
        private IMessageProcessingStrategy InitProcessingStrategy()
        {
            IWorkItemManager workItemManager;

            if (_config.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");
            return(new SimpleBugStrategy(_config, workItemManager));
        }
Ejemplo n.º 2
0
        private IMessageProcessingStrategy InitProcessingStrategy()
        {
            IWorkItemManager workItemManager = null;

            if ((_config.IcmClientConfig != null) &&
                (_config.IncidentDefaults != null) &&
                !_config.IcmClientConfig.SimulationMode)
            {
                workItemManager = new IcmWorkItemManagment(_config);
            }
            if (_config.TfsServerConfig != null && !_config.TfsServerConfig.SimulationMode)
            {
                Logger.InfoFormat("Working in standard mode, using TFSWorkItemManager");
                workItemManager = new TFSWorkItemManager(_config);
            }
            if (_config.TfsServerConfig != null && _config.TfsServerConfig.SimulationMode)
            {
                Logger.InfoFormat("Working in simulation mode. Using WorkItemManagerMock");
                workItemManager = new WorkItemManagerMock(_config.WorkItemSettings.ConversationIndexFieldName);
            }
            Logger.InfoFormat("Initializing MessageProcessingStrategy");
            return(new SimpleBugStrategy(_config, workItemManager));
        }
Ejemplo n.º 3
0
        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);
        }