diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedMethod.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedMethod.cs index 6a20f62c21..bb8744fc5c 100644 --- a/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedMethod.cs +++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedMethod.cs @@ -19,6 +19,8 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text; + using ICSharpCode.NRefactory.Semantics; namespace ICSharpCode.NRefactory.TypeSystem.Implementation @@ -217,6 +219,29 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation } } + public override string ToString() + { + StringBuilder b = new StringBuilder("["); + b.Append(this.EntityType); + b.Append(' '); + b.Append(this.DeclaringType.ReflectionName); + b.Append('.'); + b.Append(this.Name); + if (this.TypeParameters.Count > 0) { + b.Append("``"); + b.Append(this.TypeParameters.Count); + } + b.Append('('); + for (int i = 0; i < this.Parameters.Count; i++) { + if (i > 0) b.Append(", "); + b.Append(this.Parameters[i].ToString()); + } + b.Append("):"); + b.Append(this.ReturnType.ReflectionName); + b.Append(']'); + return b.ToString(); + } + /// /// Gets a dummy constructor for the specified compilation. /// diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMethod.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMethod.cs index 79b5d10fa7..a84201047d 100644 --- a/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMethod.cs +++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMethod.cs @@ -195,6 +195,9 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation b.Append(this.TypeArguments[i].ReflectionName); } b.Append(']'); + } else if (this.TypeParameters.Count > 0) { + b.Append("``"); + b.Append(this.TypeParameters.Count); } b.Append('('); for (int i = 0; i < this.Parameters.Count; i++) {