Ejemplo n.º 1
0
        public static List <Dependency> GetDependencyProp(Type type)
        {
            List <Dependency> dependencies = new List <Dependency>();
            ReflectCore       core         = new ReflectCore();

            dependencies = core.ReflectProperty(type);
            foreach (var dependency in dependencies)
            {
                switch (dependency.showType)
                {
                case PropShowType.CLASS:
                    dependency.Children = GetDependencyProp(dependency.propType);
                    break;

                case PropShowType.LIST:
                    ListDependency listDependency = dependency as ListDependency;
                    listDependency.Children = GetDependencyProp(listDependency.GenericType);
                    break;

                case PropShowType.ENUM:
                    break;

                case PropShowType.PRIMITIVE:
                    break;
                }
            }
            return(dependencies);
        }
Ejemplo n.º 2
0
        public override object GetValue()
        {
            //return base.GetValue();
            ReflectCore rc      = new ReflectCore();
            MethodInfo  methods = propType.GetMethod("Build");

            methods.MakeGenericMethod(propType).Invoke(rc, new object[] { Value, Children });
            return(Value);
        }
Ejemplo n.º 3
0
        public ListDependency(PropertyInfo prop, PropShowType type) : base(prop, type)
        {
            ReflectCore rc = new ReflectCore();

            GenericDependency = rc.ReflectProperty(GenericType);
        }