Esempio n. 1
0
        public override int CompareTo(ValidationContextTreeNode node)
        {
            Argument.IsNotNull(() => node);

            var misc = LanguageHelper.GetString("Controls_ValidationContextControl_Misc");

            var validationResultTagNode = (ValidationResultTagNode)node;

            if (TagName.EqualsIgnoreCase(misc) && !validationResultTagNode.TagName.EqualsIgnoreCase(misc))
            {
                return(1);
            }

            if (!TagName.EqualsIgnoreCase(misc) && validationResultTagNode.TagName.EqualsIgnoreCase(misc))
            {
                return(-1);
            }

            return(CultureInfo.InstalledUICulture.CompareInfo.Compare(TagName, validationResultTagNode.TagName));
        }
Esempio n. 2
0
        public virtual int CompareTo(ValidationContextTreeNode node)
        {
            Argument.IsNotNull(() => node);

            return(CultureInfo.InstalledUICulture.CompareInfo.Compare(DisplayName, node.DisplayName));
        }