Exemple #1
0
 public static object GetText(MethodDefinition method, Language language)
 {
     StringBuilder b = new StringBuilder();
     b.Append('(');
     for (int i = 0; i < method.Parameters.Count; i++) {
         if (i > 0)
             b.Append(", ");
         b.Append(language.TypeToString(method.Parameters[i].ParameterType, false, method.Parameters[i]));
     }
     if (method.CallingConvention == MethodCallingConvention.VarArg) {
         if (method.HasParameters)
             b.Append(", ");
         b.Append("...");
     }
     b.Append(") : ");
     b.Append(language.TypeToString(method.ReturnType, false, method.MethodReturnType));
     b.Append(method.MetadataToken.ToSuffixString());
     return HighlightSearchMatch(language.FormatMethodName(method), b.ToString());
 }