Beispiel #1
0
        protected override void ConnectionMergeChange(EntityChangeConnectionMerge item)
        {
            IEnumerable <EntityChangeDescriptor> temp = ChangeLog.Where(p => p.Entity == item.Entity && p is EntityChangeConnectionMerge).ToList();

            ChangeLog.RemoveAll(p =>
                                temp.Contains(p) &&
                                ((p as EntityChangeConnectionMerge).Source != item.Source || (p as EntityChangeConnectionMerge).Destination != item.Destination));

            EntityChangeConnectionMerge existing = temp.FirstOrDefault(p => (p as EntityChangeConnectionMerge).Source == item.Source && (p as EntityChangeConnectionMerge).Destination == item.Destination) as EntityChangeConnectionMerge;

            if (existing == null)
            {
                ChangeLog.Add(item);
            }
            else
            {
                existing.Order = item.Order;
            }
        }
 protected abstract void ConnectionMergeChange(EntityChangeConnectionMerge item);
Beispiel #3
0
        public override bool Equals(object obj)
        {
            EntityChangeConnectionMerge other = obj as EntityChangeConnectionMerge;

            return(base.Equals(obj) && other?.Source == Source && other?.Destination == Destination);
        }