From fb1717e9d92c986b29771c49a38b85fcecdd539b Mon Sep 17 00:00:00 2001 From: Gaspar Nagy Date: Tue, 10 Oct 2017 13:12:48 +0200 Subject: [PATCH] Set ConfigSource of default holder to "Default" instead of "AppConfig" --- .../Interfaces/SpecFlowConfigurationHolder.cs | 79 ++++++++++--------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/TechTalk.SpecFlow.Generator/Interfaces/SpecFlowConfigurationHolder.cs b/TechTalk.SpecFlow.Generator/Interfaces/SpecFlowConfigurationHolder.cs index d053798e0..b85dd6c3c 100644 --- a/TechTalk.SpecFlow.Generator/Interfaces/SpecFlowConfigurationHolder.cs +++ b/TechTalk.SpecFlow.Generator/Interfaces/SpecFlowConfigurationHolder.cs @@ -1,40 +1,41 @@ -using System; -using System.Xml; -using TechTalk.SpecFlow.Configuration; - -namespace TechTalk.SpecFlow.Generator.Interfaces -{ - /// IMPORTANT - /// This class is used for interop with the Visual Studio Extension - /// DO NOT REMOVE OR RENAME FIELDS! - /// This breaks binary serialization accross appdomains - [Serializable] - public class SpecFlowConfigurationHolder : ISpecFlowConfigurationHolder - { - private readonly string xmlString; - - public ConfigSource ConfigSource { get; private set; } - - public string Content => xmlString; - - public bool HasConfiguration => !string.IsNullOrEmpty(xmlString); - - public SpecFlowConfigurationHolder() - { - xmlString = null; - } - - public SpecFlowConfigurationHolder(ConfigSource configSource, string content) - { - ConfigSource = configSource; - xmlString = content; - } - - public SpecFlowConfigurationHolder(XmlNode configXmlNode) - { - xmlString = configXmlNode?.OuterXml; - ConfigSource = ConfigSource.AppConfig; - } - } - +using System; +using System.Xml; +using TechTalk.SpecFlow.Configuration; + +namespace TechTalk.SpecFlow.Generator.Interfaces +{ + /// IMPORTANT + /// This class is used for interop with the Visual Studio Extension + /// DO NOT REMOVE OR RENAME FIELDS! + /// This breaks binary serialization accross appdomains + [Serializable] + public class SpecFlowConfigurationHolder : ISpecFlowConfigurationHolder + { + private readonly string xmlString; + + public ConfigSource ConfigSource { get; } + + public string Content => xmlString; + + public bool HasConfiguration => !string.IsNullOrEmpty(xmlString); + + public SpecFlowConfigurationHolder() + { + ConfigSource = ConfigSource.Default; + xmlString = null; + } + + public SpecFlowConfigurationHolder(ConfigSource configSource, string content) + { + ConfigSource = configSource; + xmlString = content; + } + + public SpecFlowConfigurationHolder(XmlNode configXmlNode) + { + xmlString = configXmlNode?.OuterXml; + ConfigSource = ConfigSource.AppConfig; + } + } + } \ No newline at end of file