Interpret() public method

public Interpret ( string stringWithTokens ) : string
stringWithTokens string
return string
Ejemplo n.º 1
0
 public virtual void ApplyContext(ScenarioContext scenarioContext)
 {
     foreach (var criterion in Criteria)
     {
         foreach (var step in criterion.Steps)
         {
             var propertyInfos = step.GetType().GetProperties();
             foreach (var propertyInfo in propertyInfos)
             {
                 if (propertyInfo.PropertyType==typeof(string))
                 {
                     var oldValue = propertyInfo.GetValue(step).ToString();
                     var newValue = scenarioContext.Interpret(oldValue);
                     if(propertyInfo.SetMethod!=null)
                         propertyInfo.SetValue(step, newValue);
                 }
             }
         }
     }
 }