PdfRpt.Core.Helper.PropertyDataAnnotations.GetPropertiesInfoOfStronglyTypedListDataSource C# (CSharp) Method

GetPropertiesInfoOfStronglyTypedListDataSource() public static method

Gets PropertiesInfo[] Of StronglyTypedListDataSource.
public static GetPropertiesInfoOfStronglyTypedListDataSource ( this bodyDataSource ) : System.Reflection.PropertyInfo[]
bodyDataSource this data source
return System.Reflection.PropertyInfo[]
        public static PropertyInfo[] GetPropertiesInfoOfStronglyTypedListDataSource(this IDataSource bodyDataSource)
        {
            if (!bodyDataSource.IsStronglyTypedListDataSource()) return null;
            var genericType = bodyDataSource.GetType();
            var genericArguments = genericType.GetGenericArguments();
            var objectType = genericArguments[0];
            return objectType.GetProperties(BindingFlags.Public | BindingFlags.Instance);
        }