Exemplo n.º 1
0
        public static void UpdateConfigFromFileContent(RuntimeConfiguration runtimeConfiguration, string configFileContent)
        {
            XmlDocument configDocument;

            try
            {
                configDocument = new XmlDocument();
                configDocument.LoadXml(configFileContent);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex, "Config load error");
                return;
            }

            var specFlowNode = configDocument.SelectSingleNode("/configuration/specFlow");

            if (specFlowNode == null)
            {
                return;
            }

            var section = ConfigurationSectionHandler.CreateFromXml(specFlowNode);

            runtimeConfiguration.LoadConfiguration(section);
        }
Exemplo n.º 2
0
        public void CanLoadConfigFromString(string configString)
        {
            //const string configString = ;

            var runtimeConfig = new RuntimeConfiguration();

            runtimeConfig.LoadConfiguration(ConfigurationSectionHandler.CreateFromXml(configString));
        }
Exemplo n.º 3
0
        public void LoadConfiguration(RuntimeConfiguration defaultConfiguration)
        {
            ConfigurationSectionHandler section = GetSection();

            defaultConfiguration.LoadConfiguration(section);
        }
Exemplo n.º 4
0
        public void CanLoadConfigFromConfigFile()
        {
            var runtimeConfiguration = new RuntimeConfiguration();

            runtimeConfiguration.LoadConfiguration();
        }