As you did with PropertyInfoFieldInfo, which expose PropertyInfo property.
This can be very helpful to many custom logic based on the source PropertyInfo.
For example:
private static DisplayAttribute GetDisplayAttribute(QueryableFieldDescription fieldInfo)
{
return fieldInfo.PropertyInfo.GetCustomAttribute<DisplayAttribute>();
}
Addition: This issue is not only about QueryableFieldDescription, But in all IPivotFieldInfo's. Currently, if I want to get data about the source field/property, I need to use reflection and read private field. I'm looking for a better way. You can see my current code here: https://github.com/YehudahA/Sandbox/blob/master/FieldInfoMetadataUsingReflection.cs My suggestion is something like this: https://github.com/YehudahA/Sandbox/blob/master/FieldInfoMetadataUsingInterface.cs
*Typo
Type: As you did with PropertyInfoFieldInfo, which exposes PropertyInfo property.