IsListType() статический приватный Метод

static private IsListType ( Type type ) : bool
type System.Type
Результат bool
Пример #1
0
        public bool CanCompare(Type type1, Type type2)
        {
            var isSetType1 = ReflectionCache.IsSetType(type1);
            var isSetType2 = ReflectionCache.IsSetType(type2);

            if (!isSetType1 && !isSetType2)
            {
                return(false);
            }

            if (!isSetType1 && !ReflectionCache.IsListType(type1))
            {
                return(false);
            }

            if (!isSetType2 && !ReflectionCache.IsListType(type2))
            {
                return(false);
            }

            var elementType1 = ReflectionCache.GetEnumerationType(type1);
            var elementType2 = ReflectionCache.GetEnumerationType(type2);

            return(Inner.CanCompare(elementType1, elementType2));
        }
Пример #2
0
        public bool CanCompare(Type type1, Type type2)
        {
            if (!ReflectionCache.IsListType(type1) || !ReflectionCache.IsListType(type2))
            {
                return(false);
            }

            return(CheckInnerCanCompare(type1, type2));
        }
Пример #3
0
        public bool CanCompare(Type type1, Type type2)
        {
            if (!ReflectionCache.IsListType(type1) || !ReflectionCache.IsListType(type2))
            {
                return(false);
            }

            return(checkInnerCanCompare());

            bool checkInnerCanCompare()
            {
                var innerType1 = ReflectionCache.GetEnumerationType(type1);
                var innerType2 = ReflectionCache.GetEnumerationType(type2);

                return(Inner.CanCompare(innerType1, innerType2));
            }
        }