Jurassic.Library.PropertyDescriptor.PropertyDescriptor C# (CSharp) Method

PropertyDescriptor() public method

Creates a new PropertyDescriptor instance.
public PropertyDescriptor ( object value, PropertyAttributes attributes ) : System
value object The initial value for the property.
attributes PropertyAttributes The property attributes.
return System
        public PropertyDescriptor(object value, PropertyAttributes attributes)
        {
            this.attributes = attributes;
            this.value = value;

            // If the property is an accessor property, the state of the writable flag is dependant
            // whether the setter function exists.
            if (this.value is PropertyAccessorValue)
            {
                this.attributes |= PropertyAttributes.IsAccessorProperty;
                if (this.Setter != null)
                    this.attributes |= PropertyAttributes.Writable;
                else
                    this.attributes &= ~PropertyAttributes.Writable;
            }
        }

Same methods

PropertyDescriptor::PropertyDescriptor ( FunctionInstance getter, FunctionInstance setter, PropertyAttributes attributes ) : System