public static bool TryGetOrCreate(object x, object y, out EqualByComparer comparer)
        {
            if (x is Array && y is Array)
            {
                comparer = Default;
                return(true);
            }

            comparer = null;
            return(false);
        }
Exemplo n.º 2
0
        public static bool TryGetOrCreate(object x, object y, out EqualByComparer comparer)
        {
            if (x.GetType().Implements(typeof(IList <>)) && y.GetType().Implements(typeof(IList <>)))
            {
                comparer = Cache.GetOrAdd(x.GetType(), Create);
                return(true);
            }

            comparer = null;
            return(false);
        }
        public static bool TryGetOrCreate(object x, object y, out EqualByComparer comparer)
        {
            if (x.GetType().Implements(typeof(IDictionary<,>)) && y.GetType().Implements(typeof(IDictionary<,>)))
            {
                comparer = Cache.GetOrAdd(x.GetType(), Create);
                return true;
            }

            comparer = null;
            return false;
        }
Exemplo n.º 4
0
        public static bool TryGetOrCreate(object x, object y, out EqualByComparer comparer)
        {
            if (x is Array && y is Array)
            {
                comparer = Default;
                return true;
            }

            comparer = null;
            return false;
        }