Source/NFX/MiscUtils.cs
/// <summary>
///  Evaluates variables in a context of optional configuration supplied as dictionary which is converted to attributes
/// </summary>
Evaluates variables in a context of optional configuration supplied as dictionary which is converted to attributes
Evaluates variables in a context of optional configuration supplied as dictionary which is converted to attributes
public static string EvaluateVarsInDictionaryScope(this string line, IDictionary<string, object> dict = null, IEnvironmentVariableResolver envResolver = null, IMacroRunner macroRunner = null)
    {
        if (dict==null)
          return line.EvaluateVarsInConfigScope(null);
        else
        {
          var config = dict.ToConfigAttributes();
          config.EnvironmentVarResolver = envResolver;
          config.MacroRunner = macroRunner;
          return line.EvaluateVarsInConfigScope(config);
        }
    }
public static string EvaluateVarsInDictionaryScope ( this string line , IDictionary < string , object > dict = null , IEnvironmentVariableResolver envResolver = null , IMacroRunner macroRunner = null ) { if ( dict == null ) return line . EvaluateVarsInConfigScope ( null ) ; else { var config = dict . ToConfigAttributes ( ) ; config . EnvironmentVarResolver = envResolver ; config . MacroRunner = macroRunner ; return line . EvaluateVarsInConfigScope ( config ) ; } }
Evaluates variables in a context of optional configuration supplied as dictionary which is converted to attributes
Evaluates variables in a context of optional configuration supplied as dictionary which is converted to attributes
string
this
dict
IDictionary<string, object>
envResolver
IEnvironmentVariableResolver
macroRunner
IMacroRunner