Ejemplo n.º 1
0
        /// <summary>
        /// Clone a copy of the file information.
        /// </summary>
        /// <returns>Cloned copy of the file.</returns>
        public object Clone()
        {
            StackHashFile file = new StackHashFile(m_DateCreatedLocal, m_DateModifiedLocal,
                                                   m_Id, m_LinkDateLocal, m_Name, m_Version);

            return(file);
        }
Ejemplo n.º 2
0
 public StackHashBugReportData(StackHashProduct product, StackHashFile file, StackHashEvent theEvent, StackHashCab cab,
                               String scriptName, StackHashReportOptions options)
 {
     m_Product    = product;
     m_File       = file;
     m_Event      = theEvent;
     m_Cab        = cab;
     m_ScriptName = scriptName;
     m_Options    = options;
 }
Ejemplo n.º 3
0
        public int CompareTo(object obj)
        {
            StackHashFile file = obj as StackHashFile;

            if ((file.DateCreatedLocal == this.DateCreatedLocal) &&
                (file.DateModifiedLocal == this.DateModifiedLocal) &&
                (file.Id == this.Id) &&
                (file.LinkDateLocal == this.LinkDateLocal) &&
                (file.Name == this.Name) &&
                (file.Version == this.Version))
            {
                return(0);
            }
            else
            {
                return(-1);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Determines if a change in the file data should be reported to bug tracking plugins.
        /// </summary>
        /// <param name="newFile">The new file data.</param>
        /// <returns>True - significant changes so report it, False - nothing to report.</returns>
        public bool ShouldReportToBugTrackPlugIn(StackHashFile newFile)
        {
            if (newFile == null)
            {
                throw new ArgumentNullException("newFile");
            }

            if (this.Id != newFile.Id)
            {
                return(true);
            }
            if (this.Name != newFile.Name)
            {
                return(true);
            }
            if (this.Version != newFile.Version)
            {
                return(true);
            }

            return(false);
        }