private string GetDisplayName(PropertyDescriptor pd)
        {
            WebDisplayNameAttribute attribute = (WebDisplayNameAttribute)pd.Attributes[typeof(WebDisplayNameAttribute)];

            if ((attribute != null) && !string.IsNullOrEmpty(attribute.DisplayName))
            {
                return(attribute.DisplayName);
            }
            return(pd.Name);
        }
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }
            WebDisplayNameAttribute attribute = obj as WebDisplayNameAttribute;

            return((attribute != null) && (attribute.DisplayName == this.DisplayName));
        }
Beispiel #3
0
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }

            WebDisplayNameAttribute other = obj as WebDisplayNameAttribute;

            return((other != null) && other.DisplayName == DisplayName);
        }