public static bool IsSupportComparisons()

in src/Epam.GraphQL/Extensions/TypeExtensions.cs [234:249]


        public static bool IsSupportComparisons(this Type type)
        {
            type = type.UnwrapIfNullable();

            if (type == typeof(byte) || type == typeof(sbyte) || type == typeof(short) || type == typeof(ushort)
                || type == typeof(int) || type == typeof(uint) || type == typeof(long) || type == typeof(ulong))
            {
                // Integer types doesn't expose op_XXX operators...
                return true;
            }

            return type.GetMethod("op_LessThan", BindingFlags.Static | BindingFlags.Public) != null
                && type.GetMethod("op_LessThanOrEqual", BindingFlags.Static | BindingFlags.Public) != null
                && type.GetMethod("op_GreaterThan", BindingFlags.Static | BindingFlags.Public) != null
                && type.GetMethod("op_GreaterThanOrEqual", BindingFlags.Static | BindingFlags.Public) != null;
        }