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);
            }
        }
        public SpecIfJiraDataWriter(string url,
                                    string userName,
                                    string apiKey,
                                    ISpecIfMetadataReader metadataReader,
                                    ISpecIfDataReader dataReader) : base(metadataReader, dataReader)
        {
            _url = url;

            _jiraClient = new JiraRestClient(url, userName, apiKey);
        }
        public ProjectSelectionViewModel(ISpecIfDataReader specIfDataReader,
                                         Window dialogReference = null)
        {
            _specIfDataReader = specIfDataReader;
            _dialogReference  = dialogReference;

            OkCommand     = new RelayCommand(ExecuteOkCommand);
            CancelCommand = new RelayCommand(ExecuteCancelCommand);

            InitializeProjectList();
        }
        public SpecIfFileDataWriter(string path, ISpecIfMetadataReader metadataReader,
                                    ISpecIfDataReader dataReader) : base(metadataReader, dataReader)
        {
            _path = path;
            _identificatorFilePath = _path + _identificator;
            if (path == null)
            {
                _specIfData = new Dictionary <string, DataModels.SpecIF>();
            }
            else
            {
                if (dataReader is SpecIfFileDataReader)
                {
                    SpecIfFileDataReader fileDataReader = dataReader as SpecIfFileDataReader;
                    _specIfData = fileDataReader.SpecIfData;
                }
            }

            InitializeIdentificators();
        }
 public AbstractSpecIfDataWriter(ISpecIfMetadataReader metadataReader, ISpecIfDataReader dataReader)
 {
     _metadataReader = metadataReader;
     _dataReader     = dataReader;
 }