Esempio n. 1
0
 public bool IsMatch(BaseRelationFieldMapping mapping)
 {
     this.InitialRelateMapping();
     mapping.InitialRelateMapping();
     if (this.masterEntityMapping.TableName != mapping.masterEntityMapping.TableName)
     {
         return(false);
     }
     if (this.relateEntityMapping.TableName != mapping.relateEntityMapping.TableName)
     {
         return(false);
     }
     if (this.keyPairs.Length != mapping.keyPairs.Length)
     {
         return(false);
     }
     for (int i = 0; i < this.keyPairs.Length; i++)
     {
         bool        ismatch = false;
         RelationKey master  = this.keyPairs [i];
         for (int j = 0; j < mapping.keyPairs.Length; j++)
         {
             RelationKey relate = mapping.keyPairs [j];
             if (master.IsMatch(relate))
             {
                 ismatch = true;
                 break;
             }
         }
         if (!ismatch)
         {
             return(false);
         }
     }
     return(true);
 }
Esempio n. 2
0
 /// <summary>
 /// Determines whether this instance is match the specified target.
 /// </summary>
 /// <returns><c>true</c> if this instance is match the specified target; otherwise, <c>false</c>.</returns>
 /// <param name="target">Target.</param>
 public bool IsMatch(RelationKey target)
 {
     return(MasterKey == target.MasterKey && RelateKey == target.RelateKey);
 }
Esempio n. 3
0
 /// <summary>
 /// Determines whether this instance is match the specified target.
 /// </summary>
 /// <returns><c>true</c> if this instance is match the specified target; otherwise, <c>false</c>.</returns>
 /// <param name="target">Target.</param>
 public bool IsMatch(RelationKey target)
 {
     return(this.masterKey == target.masterKey && this.relateKey == target.relateKey);
 }