コード例 #1
0
 //-------------------------------------------------------------------------
 /// <summary>
 /// Checks if this identifier equals another identifier.
 /// <para>
 /// The comparison checks the name.
 ///
 /// </para>
 /// </summary>
 /// <param name="obj">  the other identifier, null returns false </param>
 /// <returns> true if equal </returns>
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj is LegalEntityId)
     {
         return(standardId.Equals(((LegalEntityId)obj).standardId));
     }
     return(false);
 }
コード例 #2
0
 //-------------------------------------------------------------------------
 /// <summary>
 /// Checks if this identifier equals another identifier.
 /// <para>
 /// The comparison checks the name.
 ///
 /// </para>
 /// </summary>
 /// <param name="obj">  the other identifier, null returns false </param>
 /// <returns> true if equal </returns>
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj is EtdContractSpecId)
     {
         return(standardId.Equals(((EtdContractSpecId)obj).standardId));
     }
     return(false);
 }
        /// <summary>
        /// Returns true if OptionalStandard instances are equal
        /// </summary>
        /// <param name="other">Instance of OptionalStandard to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(OptionalStandard other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     StandardId == other.StandardId ||
                     StandardId != null &&
                     StandardId.Equals(other.StandardId)
                     ) &&
                 (
                     IsOptional == other.IsOptional ||
                     IsOptional != null &&
                     IsOptional.Equals(other.IsOptional)
                 ));
        }