Пример #1
0
 /// <summary>
 /// Sets the value of the property with the given name.  If a property with the given name
 /// does not exist, or exists in the prototype chain (and is not a setter) then a new
 /// property is created.
 /// </summary>
 /// <param name="propertyReference"> The name of the property to set. </param>
 /// <param name="value"> The value to set the property to.  This must be a javascript
 /// primitive (double, string, etc) or a class derived from <see cref="ObjectInstance"/>. </param>
 /// <param name="thisValue"> The value of the "this" keyword inside a setter. </param>
 /// <param name="throwOnError"> <c>true</c> to throw an exception if the property could not
 /// be set (i.e. if the property is read-only or if the object is not extensible and a new
 /// property needs to be created). </param>
 /// <returns> <c>false</c> if <paramref name="throwOnError"/> is false and an error
 /// occurred; <c>true</c> otherwise. </returns>
 public override bool SetPropertyValue(PropertyReference propertyReference, object value, object thisValue, bool throwOnError)
 {
     return(SetPropertyValue(propertyReference.Name, value, thisValue, throwOnError));
 }
Пример #2
0
 /// <inheritdoc/>
 public override bool SetPropertyValue(PropertyReference propertyReference, object value, object thisValue, bool throwOnError)
 {
     return(new ProxyObject(Engine, target, handler).SetPropertyValue(propertyReference, value, thisValue, throwOnError));
 }
Пример #3
0
 /// <summary>
 /// Gets the value of the property with the given name.
 /// </summary>
 /// <param name="propertyReference"> The name of the property. </param>
 /// <returns> The value of the property, or <see cref="Undefined.Value"/> if the property
 /// doesn't exist. </returns>
 /// <remarks> The prototype chain is searched if the property does not exist directly on
 /// this object. </remarks>
 public override object GetPropertyValue(PropertyReference propertyReference)
 {
     return(GetPropertyValue(propertyReference.Name, this));
 }
Пример #4
0
 /// <inheritdoc/>
 public override object GetPropertyValue(PropertyReference propertyReference)
 {
     return(new ProxyObject(Engine, target, handler).GetPropertyValue(propertyReference));
 }