Esempio n. 1
0
        /// <inheritdoc />
        public AnnotationData Normalize()
        {
            CodeLocation  normalizedCodeLocation  = codeLocation.Normalize();
            CodeReference normalizedCodeReference = codeReference.Normalize();
            string        normalizedMessage       = ModelNormalizationUtils.NormalizeAnnotationText(message);
            string        normalizedDetails       = ModelNormalizationUtils.NormalizeAnnotationText(details);

            if (codeLocation == normalizedCodeLocation &&
                codeReference == normalizedCodeReference &&
                ReferenceEquals(message, normalizedMessage) &&
                ReferenceEquals(details, normalizedDetails))
            {
                return(this);
            }

            return(new AnnotationData(type, normalizedCodeLocation, normalizedCodeReference,
                                      normalizedMessage, normalizedDetails)
            {
                codeElement = codeElement
            });
        }