internal static PropertyRoute ToPropertyRoute(PropertyDescriptionRoute description)
        {
            if (description == null)
            {
                return(null);
            }

            return(PropertyRoute.Combine(PropertyRouteBuilder.ToSegment(description.Current), PropertyRouteBuilder.ToPropertyRoute(description.Parent)));
        }
        internal static PropertyRoute ToPropertyRoute(DataGridItemPropertyRoute itemProperty)
        {
            if (itemProperty == null)
            {
                return(null);
            }

            return(PropertyRoute.Combine(PropertyRouteBuilder.ToSegment(itemProperty.Current), PropertyRouteBuilder.ToPropertyRoute(itemProperty.Parent)));
        }
Ejemplo n.º 3
0
        internal static PropertyRoute Combine(PropertyRoute descendants, PropertyRoute ancestors)
        {
            if (ancestors == null)
            {
                return(descendants);
            }

            if (descendants == null)
            {
                return(ancestors);
            }

            return(PropertyRoute.Combine(
                       descendants.Current,
                       PropertyRoute.Combine(descendants.Parent, ancestors)));
        }
        internal PropertyRoute ToPropertyRoute()
        {
            if (m_segments.Count <= 0)
            {
                return(null);
            }

            var route = new PropertyRoute(m_segments[0]);

            for (int i = 1; i < m_segments.Count; i++)
            {
                route = PropertyRoute.Combine(m_segments[i], route);
            }

            return(route);
        }
Ejemplo n.º 5
0
 internal static PropertyRoute Combine(PropertyRoute descendants, PropertyRouteSegment segment)
 {
     return(PropertyRoute.Combine(descendants, new PropertyRoute(segment)));
 }