internal static IBindableView GetBindableView(BindingGroup group) { WeakReference <IBindableView> weakReference = null; BindableViews.TryGetValue(group.Id, out weakReference); return(weakReference?.GetOrDefault()); }
public Binding(BindingGroup bindingGroup) { this.BindingGroup = bindingGroup ?? new BindingGroup(); this.Id = IdPool.Next(); Bindings.Add(this.BindingGroup); this.BindingGroup.Add(this); }
internal static void Remove(BindingGroup group) { if (group != null && group.Id > 0) { var id = group.Id; AllBindingGroups.Remove(id); BindableViews.Remove(id); IdPool.Recycle(id); group.Id = 0; } }
internal static void Add(BindingGroup group) { if (group != null) { if (group.Id == 0) { group.Id = IdPool.Next(); } AllBindingGroups[group.Id] = group; } }
public Binding(TSource source, TTarget target, BindingGroup bindingChain = null) : base(bindingChain) { this.weakSource = new WeakReference <TSource>(source); this.weakTarget = new WeakReference <TTarget>(target); }
internal static void SetBindableView(BindingGroup group, IBindableView bindableView) { BindableViews[group.Id] = new WeakReference <IBindableView>(bindableView); }