Example #1
0
 public StackHashEvent(DateTime dateCreatedLocal,
                       DateTime dataModifiedLocal,
                       string eventTypeName,
                       int id,
                       StackHashEventSignature eventSignature,
                       int totalHits,
                       int fileId,
                       String bugId,
                       String plugInBugId,
                       int workFlowStatus,
                       String workFlowStatusName)
 {
     m_StructureVersion  = s_ThisStructureVersion;
     m_DateCreatedLocal  = dateCreatedLocal;
     m_DateModifiedLocal = dataModifiedLocal;
     m_EventTypeName     = eventTypeName;
     m_Id                 = id;
     m_EventSignature     = eventSignature;
     m_TotalHits          = totalHits;
     m_FileId             = fileId;
     m_BugId              = bugId;
     m_PlugInBugId        = plugInBugId;
     m_WorkFlowStatus     = workFlowStatus;
     m_WorkFlowStatusName = workFlowStatusName;
 }
Example #2
0
        /// <summary>
        /// Clones the event signature.
        /// </summary>
        /// <returns>Cloned copy of the event signature.</returns>
        public object Clone()
        {
            StackHashParameterCollection parameterCollection = new StackHashParameterCollection();

            if (m_Parameters == null)
            {
                m_Parameters = new StackHashParameterCollection();
            }

            foreach (StackHashParameter parameter in m_Parameters)
            {
                parameterCollection.Add(parameter.Clone() as StackHashParameter);
            }
            StackHashEventSignature eventSignature = new StackHashEventSignature(parameterCollection);

            eventSignature.ApplicationName      = m_ApplicationName;
            eventSignature.ApplicationTimeStamp = m_ApplicationTimeStamp;
            eventSignature.ApplicationVersion   = m_ApplicationVersion;
            eventSignature.ExceptionCode        = m_ExceptionCode;
            eventSignature.ModuleName           = m_ModuleName;
            eventSignature.ModuleTimeStamp      = m_ModuleTimeStamp;
            eventSignature.ModuleVersion        = m_ModuleVersion;
            eventSignature.Offset = m_Offset;

            return(eventSignature);
        }
Example #3
0
 public StackHashEvent(int id, string eventTypeName)
 {
     m_StructureVersion  = s_ThisStructureVersion;
     m_DateCreatedLocal  = DateTime.Now;
     m_DateModifiedLocal = DateTime.Now;
     m_EventTypeName     = eventTypeName;
     m_Id                 = id;
     m_EventSignature     = new StackHashEventSignature();
     m_TotalHits          = 0;
     m_FileId             = 0;
     m_WorkFlowStatus     = 0;
     m_WorkFlowStatusName = "Unknown";
 }
Example #4
0
        /// <summary>
        /// Clone a copy of the event.
        /// </summary>
        /// <returns>Cloned copy of the event.</returns>
        public object Clone()
        {
            StackHashEventSignature eventSignatureClone;

            if (m_EventSignature != null)
            {
                eventSignatureClone = m_EventSignature.Clone() as StackHashEventSignature;
            }
            else
            {
                eventSignatureClone = new StackHashEventSignature();
            }

            StackHashEvent theEvent = new StackHashEvent(m_DateCreatedLocal, m_DateModifiedLocal,
                                                         m_EventTypeName, m_Id, eventSignatureClone, m_TotalHits, m_FileId, m_BugId);

            return(theEvent);
        }
Example #5
0
        }                            // Needed to serialize;

        public StackHashEvent(DateTime dateCreatedLocal,
                              DateTime dataModifiedLocal,
                              string eventTypeName,
                              int id,
                              StackHashEventSignature eventSignature,
                              int totalHits,
                              int fileId)
        {
            m_StructureVersion  = s_ThisStructureVersion;
            m_DateCreatedLocal  = dateCreatedLocal;
            m_DateModifiedLocal = dataModifiedLocal;
            m_EventTypeName     = eventTypeName;
            m_Id                 = id;
            m_EventSignature     = eventSignature;
            m_TotalHits          = totalHits;
            m_FileId             = fileId;
            m_WorkFlowStatus     = 0;
            m_WorkFlowStatusName = "Unknown";
        }
Example #6
0
        /// <summary>
        /// Compares this object to the specified one.
        /// </summary>
        /// <param name="obj">Object to compare to.</param>
        /// <returns>0 for equal, or -1 if not.</returns>
        public int CompareTo(object obj)
        {
            StackHashEventSignature eventSignature = obj as StackHashEventSignature;

            if (eventSignature.Parameters.Count != this.m_Parameters.Count)
            {
                return(-1);
            }

            if ((eventSignature.ApplicationName == m_ApplicationName) &&
                (eventSignature.ApplicationVersion == m_ApplicationVersion) &&
                (eventSignature.ExceptionCode == m_ExceptionCode) &&
                (eventSignature.ModuleName == m_ModuleName) &&
                (eventSignature.Offset == m_Offset) &&
                (eventSignature.Parameters.CompareTo(m_Parameters) == 0))
            {
                return(0);
            }
            else
            {
                return(-1);
            }
        }