Пример #1
0
        protected override string GetConfigFileContent()
        {
            ProjectItem projectItem = VsxHelper.FindProjectItemByProjectRelativePath(project, "app.config");

            if (projectItem == null)
            {
                return(null);
            }

            return(VsxHelper.GetFileContent(projectItem, true));
        }
        public SpecFlowConfigurationHolder ReadConfiguration()
        {
            ProjectItem projectItem = VsxHelper.FindProjectItemByProjectRelativePath(project, "app.config");

            if (projectItem == null)
            {
                return(new SpecFlowConfigurationHolder());
            }

            string configFileContent = VsxHelper.GetFileContent(projectItem);

            return(GetConfigurationHolderFromFileContent(configFileContent));
        }
Пример #3
0
        private static SpecFlowProjectConfiguration LoadSpecFlowConfigurationFromDteProjectInternal(Project project)
        {
            SpecFlowProjectConfiguration configuration = new SpecFlowProjectConfiguration();
            ProjectItem projectItem = VsxHelper.FindProjectItemByProjectRelativePath(project, "app.config");

            if (projectItem != null)
            {
                string configFileContent = VsxHelper.GetFileContent(projectItem);
                GeneratorConfigurationReader.UpdateConfigFromFileContent(configuration.GeneratorConfiguration, configFileContent);
                RuntimeConfigurationReader.UpdateConfigFromFileContent(configuration.RuntimeConfiguration, configFileContent);
            }
            return(configuration);
        }
Пример #4
0
        public SpecFlowConfigurationHolder ReadConfiguration(IProjectReference projectReference)
        {
            var         vsProjectReference = VsProjectReference.AssertVsProjectReference(projectReference);
            ProjectItem projectItem        = VsxHelper.FindProjectItemByProjectRelativePath(vsProjectReference.Project, "app.config");

            if (projectItem == null)
            {
                return(new SpecFlowConfigurationHolder());
            }

            string configFileContent = VsxHelper.GetFileContent(projectItem);

            return(GetConfigurationHolderFromFileContent(configFileContent));
        }