Ejemplo n.º 1
0
        /// <summary>
        /// Compare request
        /// </summary>
        /// <param name="obj">object to compare to</param>
        /// <returns>true if requests are equal; false otherwise</returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (obj.GetType() != typeof(Request))
            {
                return(false);
            }

            var other = (Request)obj;

            return(Method.Equals(other.Method) &&
                   Uri.Equals(other.Uri) &&
                   QueryParam.Equals(other.QueryParam) &&
                   PostParams.All(other.PostParams.Contains));
        }