public int GetObjectBindingIndex(IObjectBinding binding) { if (binding != null && binding is ObjectBinding) { return _repository.IndexOf(binding as ObjectBinding); } return -1; }
public void AddObjectBinding(IObjectBinding binding) { if (binding == null) return; if (!Repository.Contains(binding)) { Repository.Add(binding); } }
public void RemoveObjectBinding(IObjectBinding binding) { if (binding == null) return; if (Repository.Contains(binding)) { int index = GetObjectBindingIndex(binding); SetBindingSource(index, null, null); SetBindingTarget(index, null, null); Repository.Remove(binding); } }
public void SetBinding(IObjectBinding bindableObject) { if (bindableObject == null) { Binding = null; } else { Binding = bindableObject; } OnBindingPropertyChanged(); }
private static string ComputeName <TNamingConvention>( IObjectBinding <TNamingConvention> bindingObject, string bindingObjectType, Func <INamingConvention <TNamingConvention>, string> computingDelegate) where TNamingConvention : class { try { return(bindingObject.Name is INamingConvention <TNamingConvention> convention?computingDelegate(convention) : (string)(object)bindingObject.Name); } catch (Exception exception) { throw new NamingConventionException($"{bindingObjectType}'s naming convention is invalid.", exception); } }
private static string ComputeName <TNamingConvention>( IObjectBinding <TNamingConvention> bindingObject, string bindingObjectType, Func <INamingConvention <TNamingConvention>, string> computingDelegate) where TNamingConvention : class { try { var convention = bindingObject.Name as INamingConvention <TNamingConvention>; return(convention != null?computingDelegate(convention) : (string)(object)bindingObject.Name); } catch (Exception exception) { throw new NamingConventionException(string.Format("{0}'s naming convention is invalid.", bindingObjectType), exception); } }
public MethodGetter(IObjectBinding parent) : base(parent) { }
public EventHandler(IObjectBinding parent) : base(parent) { }
public FieldHandler(IObjectBinding parent) : base(parent) { }
public NestedTypeGetter(IObjectBinding parent) : base(parent) { }
public NestedTypeGetter(IObjectBinding parent) : base(parent) { }
public ScriptableHandler(IObjectBinding parent) : base(parent) { }
public MethodGetter(IObjectBinding parent) : base(parent) { }
public EventHandler(IObjectBinding parent) : base(parent) { }
public FieldHandler(IObjectBinding parent) : base(parent) { }
public ScriptableHandler(IObjectBinding parent) : base(parent) { }
protected BaseHandler(IObjectBinding parent) { _binder = parent; }
protected BaseHandler(IObjectBinding parent) { _binder = parent; }
public PropertyHandler(IObjectBinding parent) : base(parent) { }
public PropertyHandler(IObjectBinding parent) : base(parent) { }