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));
 }