/// <summary>
        /// Determines whether a search operation can be performed on this type instance.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="operationTypes">The operation types.</param>
        /// <returns>
        ///   <c>true</c> if [is valid for operation] [the specified operation types]; otherwise, <c>false</c>.
        /// </returns>
        internal static bool IsValidForOperation(this Type type, OperationTypesEnum operationTypes)
        {
            if (operationTypes.HasFlag(OperationTypesEnum.Range))
            {
                var isValidForRangeOperations = supportedRangeOperationTypes.Contains(type);
                if (!isValidForRangeOperations)
                {
                    return(false);
                }
            }

            if (operationTypes.HasFlag(OperationTypesEnum.Search))
            {
                var isSearchableType = (type == typeof(string)) || (type == typeof(char) || type == typeof(char?));
                if (!isSearchableType)
                {
                    return(false);
                }
            }

            if (operationTypes.HasFlag(OperationTypesEnum.Equals))
            {
                var isEqualValidType = supportedEqualOperationTypes.Contains(type);
                if (!isEqualValidType)
                {
                    return(false);
                }
            }

            return(true);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="InvalidTypeForOperationException"/> class.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="operation">The operation.</param>
 public InvalidTypeForOperationException(Type type, OperationTypesEnum operation)
     : this($"Invalid type {type.FullName} for {operation.ToString()} operation.")
 {
 }