Beispiel #1
0
        public static IEnumerable <PropertyWithComponent> Flat(string flatPropertyName, object source, Func <string, PropertyInfo, bool> match, StringComparison comparison)
        {
            var trails = TrailFinder.GetTrails(flatPropertyName, source.GetType().GetProps(), match, comparison).Where(o => o != null);

            return(trails.Select(trail => Tunnelier.GetValue(trail, source)));
        }
Beispiel #2
0
        public static IEnumerable <PropertyWithComponent> Unflat(string flatPropertyName, object target, Func <string, PropertyInfo, bool> match, StringComparison comparison, Func <PropertyInfo, object, object> activator = null)
        {
            var trails = TrailFinder.GetTrails(flatPropertyName, target.GetType().GetProps(), match, comparison, false).Where(o => o != null);

            return(trails.Select(trail => Tunnelier.Digg(trail, target, activator)));
        }