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); } } } } }