コード例 #1
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);
        }
コード例 #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);
        }
コード例 #3
0
        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;
        }
コード例 #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;
        }