|
|
@ -90,20 +90,7 @@ namespace ICSharpCode.ILSpy.XmlDoc |
|
|
|
} |
|
|
|
} |
|
|
|
if (type is GenericInstanceType) { |
|
|
|
if (type is GenericInstanceType) { |
|
|
|
GenericInstanceType giType = (GenericInstanceType)type; |
|
|
|
GenericInstanceType giType = (GenericInstanceType)type; |
|
|
|
if (type.DeclaringType != null) { |
|
|
|
AppendTypeNameWithArguments(b, giType.ElementType, giType.GenericArguments); |
|
|
|
AppendTypeName(b, type.DeclaringType); |
|
|
|
|
|
|
|
b.Append('.'); |
|
|
|
|
|
|
|
} else if (!string.IsNullOrEmpty(type.Namespace)) { |
|
|
|
|
|
|
|
b.Append(type.Namespace); |
|
|
|
|
|
|
|
b.Append('.'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
b.Append(NRefactory.TypeSystem.ReflectionHelper.SplitTypeParameterCountFromReflectionName(type.Name)); |
|
|
|
|
|
|
|
b.Append('{'); |
|
|
|
|
|
|
|
for (int i = 0; i < giType.GenericArguments.Count; i++) { |
|
|
|
|
|
|
|
if (i > 0) b.Append(','); |
|
|
|
|
|
|
|
AppendTypeName(b, giType.GenericArguments[i]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
b.Append('}'); |
|
|
|
|
|
|
|
} else if (type is TypeSpecification) { |
|
|
|
} else if (type is TypeSpecification) { |
|
|
|
AppendTypeName(b, ((TypeSpecification)type).ElementType); |
|
|
|
AppendTypeName(b, ((TypeSpecification)type).ElementType); |
|
|
|
ArrayType arrayType = type as ArrayType; |
|
|
|
ArrayType arrayType = type as ArrayType; |
|
|
@ -146,6 +133,32 @@ namespace ICSharpCode.ILSpy.XmlDoc |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static int AppendTypeNameWithArguments(StringBuilder b, TypeReference type, IList<TypeReference> genericArguments) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
int outerTypeParameterCount = 0; |
|
|
|
|
|
|
|
if (type.DeclaringType != null) { |
|
|
|
|
|
|
|
TypeReference declType = type.DeclaringType; |
|
|
|
|
|
|
|
outerTypeParameterCount = AppendTypeNameWithArguments(b, declType, genericArguments); |
|
|
|
|
|
|
|
b.Append('.'); |
|
|
|
|
|
|
|
} else if (!string.IsNullOrEmpty(type.Namespace)) { |
|
|
|
|
|
|
|
b.Append(type.Namespace); |
|
|
|
|
|
|
|
b.Append('.'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
int localTypeParameterCount = 0; |
|
|
|
|
|
|
|
b.Append(NRefactory.TypeSystem.ReflectionHelper.SplitTypeParameterCountFromReflectionName(type.Name, out localTypeParameterCount)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (localTypeParameterCount > 0) { |
|
|
|
|
|
|
|
int totalTypeParameterCount = outerTypeParameterCount + localTypeParameterCount; |
|
|
|
|
|
|
|
b.Append('{'); |
|
|
|
|
|
|
|
for (int i = outerTypeParameterCount; i < totalTypeParameterCount && i < genericArguments.Count; i++) { |
|
|
|
|
|
|
|
if (i > outerTypeParameterCount) b.Append(','); |
|
|
|
|
|
|
|
AppendTypeName(b, genericArguments[i]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
b.Append('}'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return outerTypeParameterCount + localTypeParameterCount; |
|
|
|
|
|
|
|
} |
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region FindMemberByKey
|
|
|
|
#region FindMemberByKey
|
|
|
|