Beispiel #1
0
        public int CompareTo(object obj)
        {
            StackHashProduct product = obj as StackHashProduct;

            if ((m_DateCreatedLocal == product.DateCreatedLocal) &&
                (m_DateModifiedLocal == product.DateModifiedLocal) &&
                (m_FilesLink == product.FilesLink) &&
                (m_Id == product.Id) &&
                (m_Name == product.Name) &&
                (m_TotalEvents == product.TotalEvents) &&
                (m_TotalResponses == product.TotalResponses) &&
                (m_Version == product.Version))
            {
                return(0);
            }
            else
            {
                return(-1);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Determines if a change in the product data should be reported to bug tracking plugins.
        /// </summary>
        /// <param name="newProduct">The new product value.</param>
        /// <param name="checkNonWinQualFields">True - the non-winqual fields are compared too.</param>
        /// <returns>True - significant changes so report it, False - nothing to report.</returns>
        public bool ShouldReportToBugTrackPlugIn(StackHashProduct newProduct, bool checkNonWinQualFields)
        {
            if (newProduct == null)
            {
                throw new ArgumentNullException("newProduct");
            }

            if (this.Id != newProduct.Id)
            {
                return(true);
            }
            if (this.Name != newProduct.Name)
            {
                return(true);
            }
            if (this.Version != newProduct.Version)
            {
                return(true);
            }
            if (this.TotalResponses != newProduct.TotalResponses)
            {
                return(true);
            }
            if (this.TotalEvents != newProduct.TotalEvents)
            {
                return(true);
            }
            if (checkNonWinQualFields)
            {
                if (this.TotalStoredEvents != newProduct.TotalStoredEvents)
                {
                    return(true);
                }
            }

            return(false);
        }