Esempio n. 1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Path != null)
         {
             hashCode = hashCode * 59 + Path.GetHashCode();
         }
         if (TokenRequiredAttr != null)
         {
             hashCode = hashCode * 59 + TokenRequiredAttr.GetHashCode();
         }
         if (TokenAlternateUrl != null)
         {
             hashCode = hashCode * 59 + TokenAlternateUrl.GetHashCode();
         }
         if (TokenEncapsulated != null)
         {
             hashCode = hashCode * 59 + TokenEncapsulated.GetHashCode();
         }
         if (SkipTokenRefresh != null)
         {
             hashCode = hashCode * 59 + SkipTokenRefresh.GetHashCode();
         }
         return(hashCode);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Returns true if ComDayCrxSecurityTokenImplImplTokenAuthenticationHandlerProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComDayCrxSecurityTokenImplImplTokenAuthenticationHandlerProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComDayCrxSecurityTokenImplImplTokenAuthenticationHandlerProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Path == other.Path ||
                     Path != null &&
                     Path.Equals(other.Path)
                     ) &&
                 (
                     TokenRequiredAttr == other.TokenRequiredAttr ||
                     TokenRequiredAttr != null &&
                     TokenRequiredAttr.Equals(other.TokenRequiredAttr)
                 ) &&
                 (
                     TokenAlternateUrl == other.TokenAlternateUrl ||
                     TokenAlternateUrl != null &&
                     TokenAlternateUrl.Equals(other.TokenAlternateUrl)
                 ) &&
                 (
                     TokenEncapsulated == other.TokenEncapsulated ||
                     TokenEncapsulated != null &&
                     TokenEncapsulated.Equals(other.TokenEncapsulated)
                 ) &&
                 (
                     SkipTokenRefresh == other.SkipTokenRefresh ||
                     SkipTokenRefresh != null &&
                     SkipTokenRefresh.Equals(other.SkipTokenRefresh)
                 ));
        }