public static string GetDeclaration(this FieldInfo fi) { string result = null; result += " " + GetModifiers(fi); result += " " + GetTypeName(fi); result += " " + DeclarationParser.GetName(fi); return(result.Trim()); }
public static string GetDeclaration(this PropertyInfo pi) { string result = null; result += " " + GetModifiers(pi); result += " " + GetTypeName(pi); result += " " + DeclarationParser.GetName(pi); result += GetAccessors(pi); return(result.Trim()); }
public static string GetDeclaration(this MethodBase mi) { string result = null; result += " " + GetModifiers(mi); string toAdd = GetReturnTypeName(mi); result += toAdd == null ? null : " " + toAdd; result += " " + DeclarationParser.GetName(mi); result += GetParametrs(mi); return(result.Trim()); }
public static string GetDeclaration(this TypeInfo ti) { string result = null; string strToAdd = GetModifiers(ti); result = strToAdd; strToAdd = GetTypeKeyWord(ti); if (strToAdd != null) { result += " " + strToAdd; } strToAdd = DeclarationParser.GetName(ti); if (strToAdd != null) { result += " " + strToAdd; } return(result.Trim()); }