Beispiel #1
0
        private static bool MatchesImplementedInterfacesDisplayKind([NotNull] ITypeElement typeElement, ImplementedInterfacesDisplayKind displayKind)
        {
            switch (displayKind)
            {
            case ImplementedInterfacesDisplayKind.Never:
                return(false);

            case ImplementedInterfacesDisplayKind.SolutionCode:
                return(!(typeElement is ICompiledElement));

            case ImplementedInterfacesDisplayKind.SolutionCodeAndNonSystemExternalCode:
                return(!(typeElement is ICompiledElement && typeElement.IsInSystemLikeNamespace()));

            case ImplementedInterfacesDisplayKind.Always:
                return(true);

            default:
                return(false);
            }
        }
Beispiel #2
0
        private static bool MatchesBaseTypeDisplayKind([NotNull] ITypeElement typeElement, BaseTypeDisplayKind displayKind)
        {
            switch (displayKind)
            {
            case BaseTypeDisplayKind.Never:
                return(false);

            case BaseTypeDisplayKind.SolutionCode:
                return(!(typeElement is ICompiledElement));

            case BaseTypeDisplayKind.SolutionCodeAndNonSystemExternalCode:
                return(!(typeElement is ICompiledElement && typeElement.IsInSystemLikeNamespace()));

            case BaseTypeDisplayKind.OnlyIfNotSystemObject:
                return(!typeElement.IsObjectClass());

            case BaseTypeDisplayKind.Always:
                return(true);

            default:
                return(false);
            }
        }