using System.Collections.Generic;
using System.Linq;

namespace VCommon.Collections
{
    public static class ShortcutExtensionMethod
    {
        public static bool In(this byte source, params byte[] toChecks) => toChecks.Contains(source);

        public static bool In(this byte source, IEnumerable<byte> toChecks) => toChecks.Contains(source);

        public static bool In<T>(this T source, params T[] toChecks) => toChecks.Contains(source);

        public static bool In<T>(this T source, IEnumerable<T> toChecks) => toChecks.Contains(source);

        public static bool NotIn<T>(this T source, params T[] toChecks) => false == toChecks.Contains(source);

        public static bool NotIn<T>(this T source, IEnumerable<T> toChecks) => false == toChecks.Contains(source);
    }
}
