/// <summary> /// Adds in the fully qualified information for the type name if necessary. /// </summary> /// <param name="unqualifiedName">The unqualified name of the type.</param> /// <param name="fullyQualify">Indicates whether the type name should be fully qualified with declaring type and namespace names.</param> /// <param name="includeGenericInfo">Indicates whether generic parameters and arguments should be included in type names.</param> /// <param name="genericArguments"> /// The generic arguments used to parameterize a type. For nested types, this will include the arguments for the declaring type before the arguments /// for the nested type. /// </param> internal string PostProcessUnqualifiedName(string unqualifiedName, bool fullyQualify, bool includeGenericInfo, GenericTypeArgumentCollection genericArguments) { if (fullyQualify) { if (ContainingType != null) { return(ContainingType.GetDisplayName(fullyQualify, includeGenericInfo, genericArguments) + "." + unqualifiedName); } var namespaceName = GetNamespaceName(); if (string.IsNullOrEmpty(namespaceName) == false) { return(namespaceName + "." + unqualifiedName); } } return(unqualifiedName); }