/// <summary> /// Gets the value from the target object. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="target"></param> /// <returns></returns> public T GetValue <T>(SolidObject target) { if (target == null) { throw new ArgumentNullException(nameof(target)); } return((T)target.Get(this)); }
/// <summary> /// Sets the value on the target object. /// </summary> /// <param name="target"></param> /// <param name="value"></param> public void SetValue(SolidObject target, object value) { if (target == null) { throw new ArgumentNullException(nameof(target)); } target.Set(this, value); }
public PropertyValue(SolidObject target, SolidProperty property) { this.solidProperty = property; this.target = target; this.target.PropertyChanging += Target_PropertyChanging; this.target.PropertyChanged += Target_PropertyChanged; this.hierarchy = this.target as IHierarchicalObject; }
public BindingSourceValue(SolidObject solidObject) : base(solidObject, SolidObject.BindingSourceProperty) { if (this.target is IHierarchicalObject) { var hier = (IHierarchicalObject)this.target; hier.ParentChanged += Hier_ParentChanged; } }