private string GetTypeToShow(string typeName)
        {
            if (_useBuiltInNames && TypeNameFormatter.TryReplaceWithBuiltInName(ref typeName, true))
            {
                return(typeName);
            }

            if (_showShortName)
            {
                typeName = TypeNameFormatter.GetShortName(typeName);
            }

            if (typeName == string.Empty)
            {
                return(TypeReference.NoneElement);
            }

            if (TypeCache.GetType(_serializedTypeRef.TypeNameAndAssembly) == null)
            {
                _serializedTypeRef.TryUpdatingTypeUsingGUID();

                if (TypeCache.GetType(_serializedTypeRef.TypeNameAndAssembly) == null)
                {
                    return(typeName + MissingSuffix);
                }
            }

            return(typeName);
        }
        private SortedSet <TypeItem> GetFilteredTypes()
        {
            var typeRelatedAssemblies = TypeCollector.GetAssembliesTypeHasAccessTo(_declaringType);

            if (_attribute.IncludeAdditionalAssemblies != null)
            {
                IncludeAdditionalAssemblies(typeRelatedAssemblies);
            }

            var filteredTypes = TypeCollector.GetFilteredTypesFromAssemblies(
                typeRelatedAssemblies,
                _attribute);

            bool replaceBuiltInNames = _attribute.UseBuiltInNames && typeRelatedAssemblies
                                       .Any(assembly => assembly.GetName().Name == "mscorlib");

            var sortedTypes = new SortedSet <TypeItem>(new TypeItemComparer());

            for (int i = 0; i < filteredTypes.Count; i++)
            {
                var    type         = filteredTypes[i];
                string fullTypeName = type.FullName;
                if (fullTypeName == null)
                {
                    continue;
                }

                if (replaceBuiltInNames)
                {
                    TypeNameFormatter.TryReplaceWithBuiltInName(ref fullTypeName);
                }

                sortedTypes.Add(new TypeItem(type, fullTypeName, _attribute.Grouping));
            }

            return(sortedTypes);
        }