Exemple #1
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);
        }
Exemple #2
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);
        }