Esempio n. 1
0
        /// <summary>
        /// Gets a summarised type from a composite class which is just a type inheriting from object containing only the fields
        /// in the composite class needed to create a summary
        /// </summary>
        /// <param name="extendedType">The composite class</param>
        /// <returns>The summarised type</returns>
        public Type GetSummarisedType(Collator coll, Dictionary <Type, TypeBuilder> typeBuilders, Type extendedType)
        {
            var dynamicProperties = coll.ContainerSummaryFields(extendedType)
                                    .Select(p => new DynamicProperty(p.Name, p.PropertyType))
                                    .ToArray();

            return(GetCompositeClass(typeBuilders, typeof(object), dynamicProperties));
        }