Exemplo n.º 1
0
        internal static bool TryGetOrCreate(object x, object y, out IDiffBy result)
        {
            if (x.GetType().Implements(typeof(IReadOnlyList <>)) && y.GetType().Implements(typeof(IReadOnlyList <>)))
            {
                result = Cache.GetOrAdd(x.GetType(), Create);
                return(true);
            }

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

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

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

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

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

            comparer = null;
            return false;
        }