Пример #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;
 }