ResolvePropertyName() public static method

public static ResolvePropertyName ( string currentHierarchy, string propertyName ) : string
currentHierarchy string
propertyName string
return string
示例#1
0
        public static TPropertyData GetPropertyGroupProperty <TPageTypePropertyGroup, TPropertyData>(this TPageTypePropertyGroup propertyGroup, Expression <Func <TPageTypePropertyGroup, object> > expression)
            where TPageTypePropertyGroup : PageTypePropertyGroup
            where TPropertyData : PropertyData
        {
            MemberExpression memberExpression = GetMemberExpression(expression);
            string           propertyName     = PageTypePropertyGroupHierarchy.ResolvePropertyName(propertyGroup.Hierarchy.Value, memberExpression.Member.Name);
            PropertyData     propertyData     = propertyGroup.TypedPageData.Property[propertyName];

            return((TPropertyData)propertyData);
        }
示例#2
0
        public static TProperty GetPropertyGroupPropertyValue <TPageTypePropertyGroup, TProperty>(this TPageTypePropertyGroup propertyGroup, Expression <Func <TPageTypePropertyGroup, TProperty> > expression,
                                                                                                  bool usePropertyGetHandler) where TPageTypePropertyGroup : PageTypePropertyGroup
        {
            MemberExpression memberExpression = GetMemberExpression(expression);
            string           propertyName     = PageTypePropertyGroupHierarchy.ResolvePropertyName(propertyGroup.Hierarchy.Value, memberExpression.Member.Name);

            object value;

            if (usePropertyGetHandler)
            {
                value = propertyGroup.TypedPageData[propertyName];
            }
            else
            {
                value = propertyGroup.TypedPageData.GetValue(propertyName);
            }

            return(ConvertToRequestedType <TProperty>(value));
        }
示例#3
0
 public static string GetPropertyGroupPropertyName <TPageTypePropertyGroup>(this TPageTypePropertyGroup propertyGroup, Expression <Func <TPageTypePropertyGroup, object> > expression)
     where TPageTypePropertyGroup : PageTypePropertyGroup
 {
     return(PageTypePropertyGroupHierarchy.ResolvePropertyName(propertyGroup.Hierarchy.Value, GetMemberExpression(expression).Member.Name));
 }