Ejemplo n.º 1
0
        private ObjectType GetObject(Type type)
        {
            var ot = new ObjectType()
            {
                Key = type.Name
            };

            AddType(type, ot);
            if (type.GetTypeInfo().BaseType != null)
            {
                ot.Type = ConvertParamterType(type.GetTypeInfo().BaseType);
            }

            foreach (var item in GetClassProperties(type))
            {
                var p = new PropertyType()
                {
                    Type = ConvertParamterType(item.PropertyType),
                    Key  = item.Name,
                    //Required =
                };
                ot.AddPropertyType(p);
                comments.SetCommentToProperty(p, item);
            }
            comments.SetCommentToClass(ot, type);
            return(ot);
        }