C# Class Jurassic.Library.PropertyDescriptor

Represents either a named data property, or a named accessor property.
Afficher le fichier Open project: paulbartrum/jurassic Class Usage Examples

Méthodes publiques

Méthode Description
FromObject ( ObjectInstance obj, PropertyDescriptor defaults ) : PropertyDescriptor

Creates a property descriptor from an object containing any of the following properties: configurable, writable, enumerable, value, get, set.

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

Creates a new PropertyDescriptor instance with a getter function and, optionally, a setter function.

PropertyDescriptor ( object value, PropertyAttributes attributes ) : System

Creates a new PropertyDescriptor instance.

ToObject ( ScriptEngine engine ) : ObjectInstance

Populates an object with the following properties: configurable, writable, enumerable, value, get, set.

ToString ( ) : string

Gets the property value, calling the get accessor, if present.

Returns a string representing the current object.

Method Details

FromObject() public static méthode

Creates a property descriptor from an object containing any of the following properties: configurable, writable, enumerable, value, get, set.
public static FromObject ( ObjectInstance obj, PropertyDescriptor defaults ) : PropertyDescriptor
obj ObjectInstance The object to get the property values from.
defaults PropertyDescriptor The values to use if the relevant value is not specified.
Résultat PropertyDescriptor

PropertyDescriptor() public méthode

Creates a new PropertyDescriptor instance with a getter function and, optionally, a setter function.
public PropertyDescriptor ( FunctionInstance getter, FunctionInstance setter, PropertyAttributes attributes ) : System
getter FunctionInstance The function to call to retrieve the property value.
setter FunctionInstance The function to call to set the property value.
attributes PropertyAttributes The property attributes (whether the property is writable or /// not is implied by whether there is a setter function).
Résultat System

PropertyDescriptor() public méthode

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.
Résultat System

ToObject() public méthode

Populates an object with the following properties: configurable, writable, enumerable, value, get, set.
public ToObject ( ScriptEngine engine ) : ObjectInstance
engine ScriptEngine The script engine used to create a new object.
Résultat ObjectInstance

ToString() public méthode

Gets the property value, calling the get accessor, if present. Returns a string representing the current object.
public ToString ( ) : string
Résultat string