public static LightDictionaryBase <string, object> GetOrAddAttachedValues(NotifyPropertyChangedBase model, bool addNew) { if (addNew && model.AttachedValues == null) { Interlocked.CompareExchange(ref model.AttachedValues, new AttachedValueDictionary(), null); } return(model.AttachedValues); }
public static void ClearAttachedValues(NotifyPropertyChangedBase model) { var values = model.AttachedValues; if (values != null) { values.Clear(); } }
public static void ClearAttachedValues(NotifyPropertyChangedBase model) { model.AttachedValues?.Clear(); }
// *** Static Methods *** public static string GetPropertyName(Expression <Func <TestableNotifyPropertyChanged, object> > propertyExpression) { return(NotifyPropertyChangedBase.GetPropertyName(propertyExpression)); }