/// <summary> /// Attempts to return a member based on a user defined umbraco property /// </summary> /// <param name="binder"></param> /// <returns></returns> protected virtual Attempt <object> TryGetUserProperty(GetMemberBinder binder) { var name = binder.Name; var recurse = false; if (name.StartsWith("_")) { name = name.Substring(1, name.Length - 1); recurse = true; } var value = PublishedContent.GetPropertyValue(name, recurse); return(Attempt <object> .SucceedIf(value != null, value)); }
public T GetPropertyValue <T>(string alias, bool recurse, T defaultValue) { return(PublishedContent.GetPropertyValue(alias, recurse, defaultValue)); }
public T GetPropertyValue <T>(string alias) { return(PublishedContent.GetPropertyValue <T>(alias)); }
public object GetPropertyValue(string alias, bool recurse, object defaultValue) { return(PublishedContent.GetPropertyValue(alias, recurse, defaultValue)); }
public object GetPropertyValue(string alias, string defaultValue) { return(PublishedContent.GetPropertyValue(alias, defaultValue)); }
// for whatever reason, some methods returning strings were created in DynamicPublishedContent // and are now considered a "feature" as of v6. So we can't have the proper GetPropertyValue // methods returning objects, too. And we don't want to change it in v6 as that would be a // breaking change. #if FIX_GET_PROPERTY_VALUE public object GetPropertyValue(string alias) { return(PublishedContent.GetPropertyValue(alias)); }