Example #1
0
 private void WriteValueToOperation(string value, AreaDefinition area, Operation operation)
 {
     // First check: Check if the object has the property we want right away
     PropertyInfo piLocal = operation.GetType().GetProperty(area.MapToPropertyName, BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase);
     if (piLocal != null)
     {
         WriteValueToProperty(value, piLocal, operation);
     }
     else
     {
         PropertyInfo piCustomData = operation.GetType().GetProperty("CustomData");
         WriteValueToCustomData(value, area, piCustomData, operation);
     }
 }
 private void WriteValueToOperation(string value, AreaDefinition area, Operation operation)
 {
     // First check: Check if the object has the property we want right away
     bool propertyFound = WriteValueToProperty(value, area.MapToPropertyExpression, operation);
     if (propertyFound)
     {
         Logger.Instance.LogFormat(LogType.Debug, this, "Wrote value '{0}' successfully to property '{1}'.", value, area.MapToPropertyExpression);
     }
     else
     {
         PropertyInfo piCustomData = operation.GetType().GetProperty("CustomData");
         WriteValueToCustomData(value, area, piCustomData, operation);
     }
 }