public BindingRule[] GetRules() { var providers = this._root; IBindingRuleProvider root = (IBindingRuleProvider)providers; return root.GetRules().ToArray(); }
private void AddTypesFromGraph(IBindingRuleProvider root) { foreach (var rule in root.GetRules()) { var type = rule.UserType as OpenType.ExactMatch; if (type != null) { AddAssembly(type.ExactType); } } }
public IEnumerable <BindingRule> GetRules() { IBindingRuleProvider inner = _inner as IBindingRuleProvider; if (inner != null) { foreach (var rule in inner.GetRules()) { rule.Filter = FilterNode.And(_description, rule.Filter); yield return(rule); } } }
internal static void DumpRule(IBindingRuleProvider root, TextWriter output) { foreach (var rule in root.GetRules()) { var attr = rule.SourceAttribute; output.Write($"[{attr.Name}] -->"); if (rule.Filter != null) { output.Write($"[filter: {rule.Filter}]-->"); } if (rule.Converters != null) { foreach (var converterType in rule.Converters) { output.Write($"{OpenType.ExactMatch.TypeToString(converterType)}-->"); } } output.Write(rule.UserType.GetDisplayName()); output.WriteLine(); } }