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)); }
public bool CanCompare(Type type1, Type type2) { if (!ReflectionCache.IsListType(type1) || !ReflectionCache.IsListType(type2)) { return(false); } return(CheckInnerCanCompare(type1, type2)); }
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)); } }