Example #1
0
 // deep copies part of the graph
 // virtual je zbog proxy podrske za NHibernate
 public virtual DomainObject Clone(TypeAssociationPair[] reg)
 {
     if (reg != null && reg.Length > 0)
     {
         region.Clear();
         region.AddRange(reg);
         cloneRegion = true;
     }
     return Clone();
 }
Example #2
0
 protected static bool shouldClone(TypeAssociationPair typeAssociation)
 {
     if (!cloneRegion)
     {
         return(true);
     }
     foreach (TypeAssociationPair ta in region)
     {
         if (ta.Type == typeAssociation.Type &&
             ta.Association == typeAssociation.Association)
         {
             return(true);
         }
     }
     return(false);
 }
Example #3
0
 protected static bool shouldClone(TypeAssociationPair typeAssociation)
 {
     if (!cloneRegion)
         return true;
     foreach (TypeAssociationPair ta in region)
     {
         if (ta.Type == typeAssociation.Type
         && ta.Association == typeAssociation.Association)
             return true;
     }
     return false;
 }