public virtual bool IsPropertyDirty <TProperty>(Expression <Func <TProperty> > memberExpression)
 {
     return(IsPropertyDirty(MemberNameResolver.GetName(GetType(), memberExpression)));
 }
 protected virtual void SetDirty <TProperty>(Expression <Func <TProperty> > memberExpression)
 {
     SetDirty(MemberNameResolver.GetName(GetType(), memberExpression));
 }
예제 #3
0
 /// <summary>
 ///     Gets the specified property value.
 /// </summary>
 /// <typeparam name = "TProperty">The type of the property.</typeparam>
 /// <param name = "memberExpression">The member expression.</param>
 /// <param name = "initialValueFunction">The initial value function.</param>
 /// <returns></returns>
 protected internal virtual TProperty GetPropertyValue <TProperty>(Expression <Func <TProperty> > memberExpression, Func <TProperty> initialValueFunction)
 {
     return(Get(MemberNameResolver.GetName(GetType(), memberExpression), initialValueFunction));
 }
예제 #4
0
 /// <summary>
 ///     Gets the specified property value.
 /// </summary>
 /// <typeparam name = "TProperty">The type of the property.</typeparam>
 /// <param name = "memberExpression">The member expression.</param>
 /// <param name = "defaultValue">The default value.</param>
 /// <returns></returns>
 protected internal virtual TProperty GetPropertyValue <TProperty>(Expression <Func <TProperty> > memberExpression, TProperty defaultValue) where TProperty : struct
 {
     return(Get(MemberNameResolver.GetName(GetType(), memberExpression), defaultValue));
 }
예제 #5
0
 /// <summary>
 ///     Called when property changed.
 /// </summary>
 /// <typeparam name = "TProperty">The type of the property.</typeparam>
 /// <param name = "memberExpression">The member expression.</param>
 /// <param name = "oldValue">The old value.</param>
 /// <param name = "newValue">The new value.</param>
 protected void OnPropertyChanged <TProperty>(Expression <Func <TProperty> > memberExpression)
 {
     OnPropertyChanged(MemberNameResolver.GetName(GetType(), memberExpression));
 }
예제 #6
0
 protected internal virtual bool IsValueChanged <TProperty>(Expression <Func <TProperty> > memberExpression, TProperty value)
 {
     return(IsValueChanged(MemberNameResolver.GetName(GetType(), memberExpression), value));
 }
예제 #7
0
 /// <summary>
 ///     Sets the specified property value.
 /// </summary>
 /// <typeparam name = "TProperty">The type of the property.</typeparam>
 /// <param name = "memberExpression">The member expression.</param>
 /// <param name = "value">The value.</param>
 /// <param name = "raisePropertyChanged">if set to <c>true</c> raise property changed.</param>
 protected internal virtual void SetPropertyValue <TProperty>(Expression <Func <TProperty> > memberExpression, TProperty value, bool raisePropertyChanged)
 {
     Set(MemberNameResolver.GetName(GetType(), memberExpression), value, raisePropertyChanged);
 }