private static string GetGenericName(TypeReference genericType, IReadOnlyList <TypeReference> genericArguments)
        {
            string name          = genericType.Name;
            int    argumentCount = MonoUtils.GetGenericParameterCount(genericType);

            if (argumentCount == 0)
            {
                // nested class/enum (of generic class) is generic instance but it doesn't has '`' symbol in its name
                return(name);
            }

            int           index = name.IndexOf('`');
            StringBuilder sb    = new StringBuilder(genericType.Name, 0, index, 50 + index);

            sb.Append('<');
            for (int i = genericArguments.Count - argumentCount; i < genericArguments.Count; i++)
            {
                TypeReference arg          = genericArguments[i];
                string        argumentName = GetArgumentName(arg);
                sb.Append(argumentName);
                if (i < genericArguments.Count - 1)
                {
                    sb.Append(", ");
                }
            }
            sb.Append('>');
            return(sb.ToString());
        }
        private static string GetNestedGenericName(TypeReference type, List <TypeReference> genericArguments)
        {
            string name = type.Name;

            if (type.HasGenericParameters)
            {
                name = GetGenericTypeName(type, genericArguments);
                int argumentCount = MonoUtils.GetGenericParameterCount(type);
                genericArguments.RemoveRange(genericArguments.Count - argumentCount, argumentCount);
            }
            if (type.IsNested)
            {
                string declaringName = GetNestedGenericName(type.DeclaringType, genericArguments);
                return($"{declaringName}.{name}");
            }
            else
            {
                return(name);
            }
        }