C# Класс Jurassic.Library.PropertyDescriptor

Represents either a named data property, or a named accessor property.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

FromObject() публичный статический Метод

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.
Результат PropertyDescriptor

PropertyDescriptor() публичный Метод

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).
Результат System

PropertyDescriptor() публичный Метод

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.
Результат System

ToObject() публичный Метод

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.
Результат ObjectInstance

ToString() публичный Метод

Gets the property value, calling the get accessor, if present. Returns a string representing the current object.
public ToString ( ) : string
Результат string