/// <summary>
        /// This method compares two LocalizedText values.
        /// </summary>
        /// <param name="value1">First Value.</param>
        /// <param name="value2">Second Value.</param>
        /// <returns>True in case of equal values.
        /// False or ServiceResultException in case of unequal values.</returns>
        public bool CompareLocalizedText(LocalizedText value1, LocalizedText value2)
        {
            if (value1 == null)
            {
                if (value2 == null || value2 == LocalizedText.Null)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }

            if (value2 == null)
            {
                if (value1 == null || value1 == LocalizedText.Null)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }

            if (!value1.Equals(value2))
            {
                return(ReportError(value1, value1));
            }
            return(true);
        }