/// <summary>
        /// Returns metadata about exportable entity type.
        /// </summary>
        /// <typeparam name="T">Type for getting metadata.</typeparam>
        /// <param name="propertyPathsToInclude">Property full paths to include to metadata</param>
        /// <returns>Metadata for the T type, including all non-reference properties of types: T and corresponding to the passed properties.</returns>
        public static ExportedTypeMetadata GetPropertyNames(this Type type, params string[] propertyPathsToInclude)
        {
            var result = new ExportedTypeMetadata
            {
                PropertyInfos = GetPropertyNames(type, type.Name, string.Empty, propertyPathsToInclude)
                                .Where(x => !x.IsReference)
                                .Select(x => x.ExportedPropertyInfo)
                                .ToArray()
            };

            return(result);
        }
Esempio n. 2
0
 public static ExportedTypeDefinitionBuilder WithTabularMetadata(this ExportedTypeDefinitionBuilder builder, ExportedTypeMetadata tabularMetadata)
 {
     builder.ExportedTypeDefinition.TabularMetaData = tabularMetadata;
     return(builder);
 }
Esempio n. 3
0
 public static ExportedTypeDefinitionBuilder WithMetadata(this ExportedTypeDefinitionBuilder builder, ExportedTypeMetadata metadata)
 {
     builder.ExportedTypeDefinition.MetaData = metadata;
     return(builder);
 }