Beispiel #1
0
 /// <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));
 }
Beispiel #2
0
 /// <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);
 }
Beispiel #3
0
 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;
 }
Beispiel #4
0
 public BindingSourceValue(SolidObject solidObject) :
     base(solidObject, SolidObject.BindingSourceProperty)
 {
     if (this.target is IHierarchicalObject)
     {
         var hier = (IHierarchicalObject)this.target;
         hier.ParentChanged += Hier_ParentChanged;
     }
 }