/// <summary>
        /// Creates a variable of type AbstractFollowRedirect, add in the FollowRedirect list and return de variable.
        /// </summary>
        /// <param name="request">Session of request</param>
        /// <param name="rType">Redirect Type</param>
        /// <param name="page">Page of request</param>
        /// <param name="validations"></param>
        /// <returns>Returns the variable created</returns>
        internal AbstractFollowRedirect AddFollowRedirect(Session request, RedirectType rType, Page page, List <AbstractValidation> validations)
        {
            var redirect = new AbstractFollowRedirect(request, rType, page);

            redirect.Validations.AddRange(validations);
            FollowRedirects.Add(redirect);

            return(redirect);
        }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)Authentication;
         hashCode = (hashCode * 397) ^ (Username != null ? Username.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Password != null ? Password.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Token != null ? Token.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CertificateThumbprint != null ? CertificateThumbprint.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ConnectionTimeoutSeconds;
         hashCode = (hashCode * 397) ^ FollowRedirects.GetHashCode();
         hashCode = (hashCode * 397) ^ AllowInvalidCertificate.GetHashCode();
         hashCode = (hashCode * 397) ^ AllowInvalidResponseContentTypeCharSet.GetHashCode();
         hashCode = (hashCode * 397) ^ ThrowExceptionOnErrorResponse.GetHashCode();
         return(hashCode);
     }
 }
Example #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)Authentication;
         hashCode = (hashCode * 397) ^ (Username != null ? Username.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Password != null ? Password.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Token != null ? Token.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ClientCertificateSource.GetHashCode();
         hashCode = (hashCode * 397) ^ (CertificateThumbprint != null ? CertificateThumbprint.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ClientCertificateInBase64 != null ? ClientCertificateInBase64.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ClientCertificateFilePath != null ? ClientCertificateFilePath.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ LoadEntireChainForCertificate.GetHashCode();
         hashCode = (hashCode * 397) ^ ConnectionTimeoutSeconds;
         hashCode = (hashCode * 397) ^ FollowRedirects.GetHashCode();
         hashCode = (hashCode * 397) ^ AllowInvalidCertificate.GetHashCode();
         hashCode = (hashCode * 397) ^ AllowInvalidResponseContentTypeCharSet.GetHashCode();
         hashCode = (hashCode * 397) ^ ThrowExceptionOnErrorResponse.GetHashCode();
         hashCode = (hashCode * 397) ^ AutomaticCookieHandling.GetHashCode();
         return(hashCode);
     }
 }
 /// <summary>
 /// Returns if a request is a follow redirect.
 /// </summary>
 /// <param name="url">URL of request</param>
 /// <returns>Returns true if the request belongs to FollowRedirects list or false otherwise</returns>
 public bool IsUrlInFollowRedirectChain(string url)
 {
     return(url == RefererURL || FollowRedirects.Any(followRedirect => followRedirect.FiddlerSession.fullUrl == url));
 }
 internal void AddFollowRedirect(AbstractFollowRedirect followRedirect)
 {
     FollowRedirects.Add(followRedirect);
 }