public void Initialize(XmlElement config, IEventManager eventManager, IProfile profile) { var bugzillaConfig = new BugzillaServiceConfiguration(); ConfigurationReader.ReadConfigurationValues(bugzillaConfig, config); ConfigurationReader.ProcessMappingSettings(bugzillaConfig.ProjectMappings, config[ProjectMappingsNode], BugzillaProjectNode, VersionOneProjectNode); ConfigurationReader.ProcessMappingSettings(bugzillaConfig.PriorityMappings, config[PriorityMappingsNode], BugzillaPriorityNode, VersionOnePriorityNode); sourceFieldValue = config["SourceFieldValue"].InnerText; this.eventManager = eventManager; logger = new Logger(eventManager); var bugzillaClientConfiguration = new BugzillaClientConfiguration { UserName = bugzillaConfig.UserName, Password = bugzillaConfig.Password, Url = bugzillaConfig.Url, IgnoreSSLCert = bugzillaConfig.IgnoreCert }; bugzillaClientFactory = new BugzillaClientFactory(bugzillaClientConfiguration, logger); var readerUpdater = new BugzillaReaderUpdater(bugzillaConfig, bugzillaClientFactory, logger); bugzillaReader = readerUpdater; bugzillaUpdater = readerUpdater; this.eventManager.Subscribe(typeof(IntervalSync), OnInterval); this.eventManager.Subscribe(typeof(WorkitemCreationResult), OnDefectCreated); this.eventManager.Subscribe(typeof(WorkitemStateChangeCollection), OnDefectStateChanged); }
public void Initialize(XmlElement config, IEventManager eventManager, IProfile profile) { var bugzillaConfig = new BugzillaServiceConfiguration(); ConfigurationReader.ReadConfigurationValues(bugzillaConfig, config); ConfigurationReader.ProcessMappingSettings(bugzillaConfig.ProjectMappings, config[ProjectMappingsNode], BugzillaProjectNode, VersionOneProjectNode); ConfigurationReader.ProcessMappingSettings(bugzillaConfig.PriorityMappings, config[PriorityMappingsNode], BugzillaPriorityNode, VersionOnePriorityNode); sourceFieldValue = config["SourceFieldValue"].InnerText; this.eventManager = eventManager; logger = new Logger(eventManager); var readerUpdater = new BugzillaReaderUpdater(bugzillaConfig, new BugzillaClientFactory(), logger); bugzillaReader = readerUpdater; bugzillaUpdater = readerUpdater; this.eventManager.Subscribe(typeof(IntervalSync), OnInterval); this.eventManager.Subscribe(typeof(WorkitemCreationResult), OnDefectCreated); this.eventManager.Subscribe(typeof(WorkitemStateChangeCollection), OnDefectStateChanged); }