Exemple #1
0
        internal static InformationApi.PropertyInfo BuildPropInfo(System.Reflection.PropertyInfo f)
        {
            var fi = new InformationApi.PropertyInfo();

            fi.Name        = f.Name;
            fi.Description = GetDescription(f);
            fi.Type        = f.PropertyType.Name;
            fi.CanGet      = f.CanRead;
            fi.CanSet      = f.CanWrite;

            foreach (var pi in f.GetIndexParameters())
            {
                fi.Indizes.Add(BuildArgInfo(pi));
            }

            if (!f.PropertyType.IsSimpleType())
            {
                StructCollector.CollectType(f.PropertyType);
            }

            fi.ThrowsExceptionInfo = BuildExceptionInfo(f);
            //ToDo: continue Funcinfo build!

            return(fi);
        }
Exemple #2
0
        internal static ArgumentInfo BuildArgInfo(ParameterInfo arg)
        {
            var ai = new ArgumentInfo();

            ai.Name                = arg.Name;
            ai.Description         = GetDescription(arg);
            ai.IsOptional          = arg.IsOptional;
            ai.Type                = arg.ParameterType.Name;
            ai.ThrowsExceptionInfo = BuildExceptionInfo(arg);

            if (!arg.ParameterType.IsSimpleType())
            {
                StructCollector.CollectType(arg.ParameterType);
            }

            return(ai);
        }
Exemple #3
0
        internal static FuncInfo BuildFuncInfo(MethodInfo f)
        {
            var fi = new FuncInfo();

            fi.Name        = f.Name;
            fi.Description = GetDescription(f);
            fi.ReturnType  = f.ReturnType.Name;

            if (!f.ReturnType.IsSimpleType())
            {
                StructCollector.CollectType(f.ReturnType);
            }

            fi.ThrowsExceptionInfo = BuildExceptionInfo(f);
            fi.Arguments           = BuildArgInfoCol(f.GetParameters());
            //ToDo: continue Funcinfo build!

            return(fi);
        }