internal ReflectionClass(Type type)
 {
     this.attributes = new ReflectionAttributeList(type.GetCustomAttributes(true).OfType<Attribute>().ToList());
     this.baseType = type;
     var propertyInfos = type.GetProperties().ToList();
     var propertyMethods = propertyInfos.SelectMany(a => new[] { a.GetGetMethod(), a.GetSetMethod() });
     this.properties = new ReflectionPropertyList(propertyInfos, this);
     this.methods = new ReflectionMethodList(type.GetMethods().Except(propertyMethods).ToList(), this);
     this.name = type.Name;
     this.fullName = type.FullName;
 }
        internal ReflectionMethod(MethodInfo method, ReflectionClass parent)
        {
            this.method = method;
            this.parent = parent;

            this.returnType = this.method.ReturnType;
            this.attributes =
                new ReflectionAttributeList(this.method.GetCustomAttributes(true).OfType<Attribute>().ToList());
            this.name = this.method.Name;
            this.parameters = this.method.GetParameters();
        }
        internal ReflectionProperty(PropertyInfo property, ReflectionClass parent)
        {
            this.property = property;
            this.parent = parent;

            this.attributes =
                new ReflectionAttributeList(this.property.GetCustomAttributes(true).OfType<Attribute>().ToList());
            this.name = this.property.Name;
            this.propertyType = this.property.PropertyType;

            var method = this.property.GetGetMethod() ?? this.property.GetGetMethod(true);
            if (method != null)
            {
                this.getMethod = new ReflectionMethod(method, parent);
            }

            method = this.property.GetSetMethod() ?? this.property.GetSetMethod(true);
            if (method != null)
            {
                this.setMethod = new ReflectionMethod(method, parent);
            }
        }