public bool IsDeepEqual(object target) { if (target is DeltaModelDictionary <TKey, TValue> buddy) { if (buddy._inner.Count != _inner.Count) { return(false); } foreach (var s in _inner) { if (!buddy._inner.TryGetValue(s.Key, out var buddyValue)) { return(false); } if (!_manager.IsDeepEqual(s.Value, buddyValue)) { return(false); } } return(true); } return(false); }
public bool IsDeepEqual(object target) { if (target is IEntityHandlerProvider buddyProvider && buddyProvider.GetHandler() is DeltaModelInterceptor buddy) { if (buddy._values.Count != _values.Count) { return(false); } foreach (var s in _values) { if (!buddy._values.TryGetValue(s.Key, out var buddyValue)) { return(false); } if (!_manager.IsDeepEqual(s.Value, buddyValue)) { return(false); } } return(true); } return(false); }