public static bool TryGetBinder(string prefix, out IPDFBindingExpressionFactory binder) { GenerationConfigurationSection section = GeneratorSection; if (null == section) { binder = null; return(false); } BindingFactoryElementCollection col = section.ExpressionBinders; BindingFactoryElement ele = null; if (col == null || col.Count == 0) { binder = null; return(false); } else if (col.TryGetBindingElement(prefix, out ele)) { binder = ele.GetFactory(); return(null != binder); } else { binder = null; return(false); } }
public static BindingFactoryElementCollection GetExplicitBindingFactories() { GenerationConfigurationSection gen = GeneratorSection; if (null != gen) { BindingFactoryElementCollection elements = gen.ExpressionBinders; return(elements); } return(null); }