public Binding <T> WithBinding(object target, string targetProperty, string sourcePath, Func <object, object> valueConverter) { //If top level changes, we need to update children //If member of top level changes, we need to update children var binding = new DotPathBinding(target, targetProperty, DotPath.CompileDotPath(typeof(T), sourcePath), valueConverter); Bindings.Add(binding); return(this); }
public Binding <T> WithMultiBinding(Callback <BindingChange[]> callback, params string[] paths) { var compiledPaths = new PropertyInfo[paths.Length][]; for (int i = 0; i < paths.Length; i++) { compiledPaths[i] = DotPath.CompileDotPath(typeof(T), paths[i]); } var binding = new MultiDotPathBinding(callback, paths, compiledPaths); Bindings.Add(binding); return(this); }