private string GetTransformation(object o)
{
if (o == null) return null;
if (o is String)
return (String)o;
else if (o is Transformation)
return ((Transformation)o).Generate();
else
throw new NotSupportedException(String.Format("Instance of type {0} is not supported as Transformation!", o.GetType()));
}