GetProperty() public method

public GetProperty ( string name ) : object
name string
return object
 protected string GetProperty(GenericContent content, string propertyName)
 {
     if (content == null)
         return string.Empty;
     var value = content.GetProperty(propertyName);
     return value == null ? string.Empty : value.ToString();
 }
        protected string GetProperty(GenericContent content, string propertyName)
        {
            if (content == null)
            {
                return(string.Empty);
            }
            var value = content.GetProperty(propertyName);

            return(value == null ? string.Empty : value.ToString());
        }
Example #3
0
        public static string GetProperty(GenericContent content, string propertyName)
        {
            if (content == null)
            {
                return(string.Empty);
            }
            if (string.IsNullOrEmpty(propertyName))
            {
                return(content.Id.ToString());
            }

            var value = content.GetProperty(propertyName);

            return(value == null ? string.Empty : value.ToString());
        }
Example #4
0
        public static string GetProperty(GenericContent content, string propertyName)
        {
            if (content == null)
                return string.Empty;
            if (string.IsNullOrEmpty(propertyName))
                return content.Id.ToString();

            var value = content.GetProperty(propertyName);
            return value == null ? string.Empty : value.ToString();
        }
Example #5
0
        protected string GetProperty(GenericContent content, string propertyName)
        {
            //TODO: handle recursive property definitions - e.g. @@Node.Reference.FieldName@@
            if (content == null)
                return string.Empty;
            if (string.IsNullOrEmpty(propertyName))
                return content.Id.ToString();

            var value = content.GetProperty(propertyName);
            return value == null ? string.Empty : value.ToString();
        }