Source/NFX/MiscUtils.cs
/// <summary>
///  Evaluates variables in a context of optional configuration supplied in XML format
/// </summary>
Evaluates variables in a context of optional configuration supplied in XML format
Evaluates variables in a context of optional configuration supplied in XML format
public static string EvaluateVarsInXMLConfigScope(this string line, string xmlScope = null, IEnvironmentVariableResolver envResolver = null, IMacroRunner macroRunner = null)
    {
        Configuration config = null;
        if (!string.IsNullOrWhiteSpace(xmlScope))
        {
          config =  XMLConfiguration.CreateFromXML(xmlScope);
          config.EnvironmentVarResolver = envResolver;
          config.MacroRunner = macroRunner;
        }
        return line.EvaluateVarsInConfigScope( config );
    }
public static string EvaluateVarsInXMLConfigScope ( this string line , string xmlScope = null , IEnvironmentVariableResolver envResolver = null , IMacroRunner macroRunner = null ) { Configuration config = null ; if ( ! string . IsNullOrWhiteSpace ( xmlScope ) ) { config = XMLConfiguration . CreateFromXML ( xmlScope ) ; config . EnvironmentVarResolver = envResolver ; config . MacroRunner = macroRunner ; } return line . EvaluateVarsInConfigScope ( config ) ; }
Evaluates variables in a context of optional configuration supplied in XML format
Evaluates variables in a context of optional configuration supplied in XML format
string
this
xmlScope
string
envResolver
IEnvironmentVariableResolver
macroRunner
IMacroRunner