Esempio n. 1
0
        /// <summary>
        /// Display name for the property.
        /// </summary>
        public string GetDisplayName()
        {
            if (DisplayName != null)
            {
                return(DisplayName.GetString());
            }

            return(PropertyName.SplitPascalCase());
        }
Esempio n. 2
0
        /// <summary>
        /// Display name for the property.
        /// </summary>
        public string GetDisplayName(object model)
        {
            string result = null;

            if (DisplayName != null)
            {
                result = DisplayName.GetString(model);
            }

            if (result == null)
            {
                result = propertyDisplayName;
            }

            return(result);
        }
Esempio n. 3
0
        /// <summary>
        /// Display name for the property.
        /// </summary>
        public string GetDisplayName()
        {
            string result = null;

            if (DisplayName != null)
            {
                result = DisplayName.GetString(null /*We don't have a model object at this point*/);
            }

            if (result == null)
            {
                result = propertyDisplayName;
            }

            return(result);
        }
Esempio n. 4
0
        /// <summary>
        /// Display name for the property.
        /// </summary>
        public string GetDisplayName(IValidationContext context)
        {
            string result = null;

            if (DisplayName != null)
            {
                result = DisplayName.GetString(context);
            }

            if (result == null)
            {
                result = _propertyDisplayName;
            }

            return(result);
        }
Esempio n. 5
0
        /// <summary>
        /// Display name for the property.
        /// </summary>
        public string GetDisplayName()
        {
            string result = null;

            if (DisplayName != null)
            {
                result = DisplayName.GetString(null);
            }

            if (result == null)
            {
                result = _propertyDisplayName;
            }

            return(result);
        }
Esempio n. 6
0
        /// <summary>
        /// Display name for the property.
        /// </summary>
        public string GetDisplayName()
        {
            string result = null;

            if (DisplayName != null)
            {
                result = DisplayName.GetString();
            }

            if (result == null)
            {
                result = PropertyName.SplitPascalCase();
            }

            return(result);
        }
Esempio n. 7
0
 private string BuildPropertyName(ValidationContext context)
 {
     return(context.PropertyChain.BuildPropertyName(PropertyName ?? DisplayName.GetString()));
 }