internal static IBindableView GetBindableView(BindingGroup group) { WeakReference <IBindableView> weakReference = null; BindableViews.TryGetValue(group.Id, out weakReference); return(weakReference?.GetOrDefault()); }
/// <summary> /// Indicates whether this <see cref="WeakReference{T}"/> is alive. /// </summary> /// <typeparam name="T">The type of the object.</typeparam> /// <param name="self">The weak reference.</param> /// <returns></returns> public static bool IsAlive <T>(this WeakReference <T> self) where T : class { return(self?.GetOrDefault() != default(T)); }