Exemple #1
0
        public TValue GetValueOrDefault <TValue>(TypedPropertyDefinition <TValue> typedProperty)
        {
            object obj;

            if (!this.propertyValues.TryGetValue(typedProperty.Name, out obj))
            {
                return(typedProperty.DefaultValue);
            }
            return((TValue)((object)obj));
        }
 public EntityPropertyAccessor(TypedPropertyDefinition <TValue> propertyDefinition, Func <TEntity, TValue> getterDelegate, Action <TEntity, TValue> setterDelegate) : base(propertyDefinition, getterDelegate, setterDelegate)
 {
 }
Exemple #3
0
 protected EntityPropertyAccessorBase(TypedPropertyDefinition <TValue> propertyDefinition, Func <TEntity, TValue> getterDelegate, Action <TEntity, TValue> setterDelegate) : base(false)
 {
     this.PropertyDefinition = propertyDefinition;
     this.getterDelegate     = getterDelegate;
     this.setterDelegate     = setterDelegate;
 }
Exemple #4
0
 public void SetValue <TValue>(TypedPropertyDefinition <TValue> typedProperty, TValue value)
 {
     this.propertyValues[typedProperty.Name] = value;
 }