internal MethodLevel(MethodInfo method) { methodInfo = method; Name = method.Name; Type = GenericDodger.GetName(method.ReturnType); Parameters = method.GetParameters(); }
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)); }
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) + ")"); }
internal FieldLevel(FieldInfo field) { Type = GenericDodger.GetName(field.FieldType); Name = field.Name; fieldInfo = field; }
internal PropertyLevel(PropertyInfo prop) { Type = GenericDodger.GetName(prop.PropertyType); Name = prop.Name; propInfo = prop; }