public string GetNameWithDeclaringType(IMethodReference value) { ITypeReference declaringType = value.DeclaringType as ITypeReference; if (declaringType != null) { return(this.GetNameWithResolutionScope(declaringType) + "." + this.GetNameWithParameterList(value)); } IArrayType type = value.DeclaringType as IArrayType; if (type == null) { throw new NotSupportedException(); } return(type.ToString() + "." + this.GetNameWithParameterList(value)); }
public static string GetNameWithDeclaringType(IMethodReference value) { ITypeReference typeReference = value.DeclaringType as ITypeReference; if (typeReference != null) { return(Helper.GetNameWithResolutionScope(typeReference) + "." + Helper.GetNameWithParameterList(value)); } IArrayType arrayType = value.DeclaringType as IArrayType; if (arrayType != null) { return(arrayType.ToString() + "." + Helper.GetNameWithParameterList(value)); } throw new NotSupportedException(); }
public static string GetNameWithDeclaringType(IMethodReference value) { ITypeReference typeReference = value.DeclaringType as ITypeReference; string result; if (typeReference != null) { result = GetNameWithResolutionScope(typeReference) + "." + GetNameWithParameterList(value); } else { IArrayType arrayType = value.DeclaringType as IArrayType; if (arrayType == null) { throw new NotSupportedException(); } result = arrayType.ToString() + "." + GetNameWithParameterList(value); } return(result); }