예제 #1
0
 internal MethodLevel(MethodInfo method)
 {
     methodInfo = method;
     Name       = method.Name;
     Type       = GenericDodger.GetName(method.ReturnType);
     Parameters = method.GetParameters();
 }
예제 #2
0
        internal ClassLevel(Type type)
        {
            this.type = type;
            BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly;

            Name       = GenericDodger.GetName(type);
            Properties = GetProperties(type.GetProperties(flags));
            Fields     = GetFields(type.GetFields(flags));
            Methods    = GetMethods(type.GetMethods(flags));
        }
예제 #3
0
        private string GetSignature(MethodLevel method)
        {
            string signature = "";

            signature += (method.Type + " " + method.Name + "(");
            if (method.Parameters.Length == 0)
            {
                return(signature + ")");
            }
            foreach (ParameterInfo p in method.Parameters)
            {
                if (p.IsOut)
                {
                    signature += "out ";
                }
                signature += (GenericDodger.GetName(p.ParameterType) + " " + p.Name + ", ");
            }
            while (signature.IndexOf('&') != -1)
            {
                signature = signature.Replace('&', ' ');
            }
            return(signature.Substring(0, signature.Length - 2) + ")");
        }
예제 #4
0
 internal FieldLevel(FieldInfo field)
 {
     Type      = GenericDodger.GetName(field.FieldType);
     Name      = field.Name;
     fieldInfo = field;
 }
예제 #5
0
 internal PropertyLevel(PropertyInfo prop)
 {
     Type     = GenericDodger.GetName(prop.PropertyType);
     Name     = prop.Name;
     propInfo = prop;
 }