コード例 #1
0
 public override void Process(RemovalContext context, AssociationInfo association, Entity removingObject, Entity target, Entity referencingObject, Entity referencedObject)
 {
     if (!context.Contains(target) && referencingObject != referencedObject)
     {
         throw new ReferentialIntegrityException(association, removingObject, referencingObject, referencedObject);
     }
 }
コード例 #2
0
        public bool Contains(Entity entity)
        {
            if (processedEntities.Contains(entity))
            {
                return(true);
            }

            return(queue.TryGetValue(entity.TypeInfo, out var set) && set.Contains(entity)
        ? true
        : parent != null && parent.Contains(entity));
        }
コード例 #3
0
        public bool Contains(Entity entity)
        {
            if (processedEntities.Contains(entity))
            {
                return(true);
            }
            HashSet <Entity> set;

            if (queue.TryGetValue(entity.TypeInfo, out set) && set.Contains(entity))
            {
                return(true);
            }
            return(parent != null && parent.Contains(entity));
        }