Esempio n. 1
0
        public IList <ClassDefinition> Read()
        {
            var types = m_assembly.GetTypes();

            var classDefinitions = new List <ClassDefinition>();

            foreach (var type in types)
            {
                var classDefinition = new ClassDefinition {
                    Name = type.Name
                };

                var properties = type.GetProperties();

                foreach (var property in properties)
                {
                    var propertyTypeString = typeToStringConverter.GetString(property.PropertyType);

                    classDefinition.AddPropertyDefinition(
                        property.Name,
                        propertyTypeString);
                }

                classDefinitions.Add(classDefinition);
            }

            return(classDefinitions);
        }