/// <summary>
        /// Returns true if ComAdobeGraniteFragsImplCheckHttpHeaderFlagProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComAdobeGraniteFragsImplCheckHttpHeaderFlagProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComAdobeGraniteFragsImplCheckHttpHeaderFlagProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     FeatureName == other.FeatureName ||
                     FeatureName != null &&
                     FeatureName.Equals(other.FeatureName)
                     ) &&
                 (
                     FeatureDescription == other.FeatureDescription ||
                     FeatureDescription != null &&
                     FeatureDescription.Equals(other.FeatureDescription)
                 ) &&
                 (
                     HttpHeaderName == other.HttpHeaderName ||
                     HttpHeaderName != null &&
                     HttpHeaderName.Equals(other.HttpHeaderName)
                 ) &&
                 (
                     HttpHeaderValuepattern == other.HttpHeaderValuepattern ||
                     HttpHeaderValuepattern != null &&
                     HttpHeaderValuepattern.Equals(other.HttpHeaderValuepattern)
                 ));
        }
 /// <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 (FeatureName != null)
         {
             hashCode = hashCode * 59 + FeatureName.GetHashCode();
         }
         if (FeatureDescription != null)
         {
             hashCode = hashCode * 59 + FeatureDescription.GetHashCode();
         }
         if (HttpHeaderName != null)
         {
             hashCode = hashCode * 59 + HttpHeaderName.GetHashCode();
         }
         if (HttpHeaderValuepattern != null)
         {
             hashCode = hashCode * 59 + HttpHeaderValuepattern.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 3
0
        /**************************************************************************/

        private void ProcessResponseHttpHeaders(HttpWebRequest req, HttpWebResponse res)
        {
            foreach (string HttpHeaderName in res.Headers)
            {
                if (HttpHeaderName.ToLower().Equals("date"))
                {
                    string DateString = res.GetResponseHeader(HttpHeaderName);
                    this.DateServer = MacroscopeDateTools.ParseHttpDate(HeaderField: HttpHeaderName, DateString: DateString);
                }

                if (HttpHeaderName.ToLower().Equals("last-modified"))
                {
                    string DateString = res.GetResponseHeader(HttpHeaderName);
                    this.DateModified = MacroscopeDateTools.ParseHttpDate(HeaderField: HttpHeaderName, DateString: DateString);
                }
            }

            if (this.DateServer.Date == new DateTime().Date)
            {
                this.DateServer = DateTime.UtcNow;
            }

            if (this.DateModified.Date == new DateTime().Date)
            {
                this.DateModified = this.DateServer;
            }
        }