Beispiel #1
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);
            }
        }