Example #1
0
        private ITypeReference GetBaseType(ITypeDefinition type)
        {
            if (type == Dummy.Type)
            {
                return(null);
            }

            ITypeReference baseTypeRef = type.BaseClasses.FirstOrDefault();

            if (baseTypeRef == null)
            {
                return(null);
            }

            if (baseTypeRef.IsDefaultCSharpBaseType(type))
            {
                return(null);
            }

            if (!IncludeBaseType(baseTypeRef))
            {
                return(GetBaseType(baseTypeRef.ResolvedType));
            }

            return(baseTypeRef);
        }