private void InitializeDataProviders()
        {
            try
            {
                SpecIfPluginConfiguration configuration = _configurationReaderWriter.GetConfiguration();

                _metadataReader = new SpecIfFileMetadataReader(configuration.SpecIfMetadataDirectory);

                _specIfDataReader = new SpecIfJiraDataReader(configuration.JiraURL,
                                                             configuration.JiraUserName,
                                                             configuration.JiraApiKey,
                                                             _metadataReader);

                _requirementMasterDataWriter = new SpecIfJiraDataWriter(configuration.JiraURL,
                                                                        configuration.JiraUserName,
                                                                        configuration.JiraApiKey,
                                                                        _metadataReader,
                                                                        _specIfDataReader);

                _projectIntegrator = new ProjectIntegrator(_repository,
                                                           _metadataReader,
                                                           _specIfDataReader);
            }
            catch (Exception exception)
            {
                MessageBox.Show("Error initializing the data providers\r\n" + exception.StackTrace, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                logger.Error(exception);
            }
        }
Exemple #2
0
        public string EA_Connect(EAAPI.Repository repository)
        {
            try
            {
                ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); };
                ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

                SimpleIoc.Default.Register <IConfigurationReaderWriter <SpecIfPluginConfiguration>, FileConfigurationReaderWriter <SpecIfPluginConfiguration> >();

                IConfigurationReaderWriter <SpecIfPluginConfiguration> configurationReaderWriter = SimpleIoc.Default.GetInstance <IConfigurationReaderWriter <SpecIfPluginConfiguration> >();

                if (configurationReaderWriter != null)
                {
                    _configuration = configurationReaderWriter.GetConfiguration();

                    if (_configuration == null)
                    {
                        _configuration = new SpecIfPluginConfiguration();
                        configurationReaderWriter.StoreConfiguration(_configuration);
                    }
                }

                _mainViewModel = new MainViewModel(repository);
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.ToString());
            }

            return("");
        }