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) { }
protected EntityPropertyAccessorBase(TypedPropertyDefinition <TValue> propertyDefinition, Func <TEntity, TValue> getterDelegate, Action <TEntity, TValue> setterDelegate) : base(false) { this.PropertyDefinition = propertyDefinition; this.getterDelegate = getterDelegate; this.setterDelegate = setterDelegate; }
public void SetValue <TValue>(TypedPropertyDefinition <TValue> typedProperty, TValue value) { this.propertyValues[typedProperty.Name] = value; }