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 => TunnelierCustom.GetValue(trail, source))); }
public static IEnumerable <PropertyWithComponent> Unflat(string flatPropertyName, object target, Func <string, PropertyInfo, bool> match, StringComparison comparison) { var trails = TrailFinder.GetTrails(flatPropertyName, target.GetType().GetProps(), match, comparison, false).Where(o => o != null); return(trails.Select(trail => TunnelierCustom.Digg(trail, target))); }
public void GetAllTrails() { var l = TrailFinder.GetTrails("The2FooBarName", typeof(Unflat).GetInfos(), t => t == typeof(string), StringComparison.Ordinal); l.Count().IsEqualTo(2); }
public void GetTrails() { var l = TrailFinder.GetTrails("TheFooBarName", typeof(Unflat).GetInfos().Single(o => o.Name == "The"), o => o == typeof(string), new List <string>(), StringComparison.Ordinal).ToList(); l.Count.IsEqualTo(2); }
public void GetAllTrailsByObject() { var l = TrailFinder.GetTrails("The2FooBarName", new Unflat(), Match, StringComparison.Ordinal); l.Count().IsEqualTo(2); }
public void GetAllTrails() { var l = TrailFinder.GetTrails("The2FooBarName", typeof(Unflat).GetProperties(), Match, StringComparison.Ordinal); l.Count().IsEqualTo(2); }