示例#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;
            }
        }
示例#2
0
 protected abstract void ConnectionMergeChange(EntityChangeConnectionMerge item);
示例#3
0
        public override bool Equals(object obj)
        {
            EntityChangeConnectionMerge other = obj as EntityChangeConnectionMerge;

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