C# 클래스 MsieJavaScriptEngine.JsRt.Ie.IeJsValue

“IE” JavaScript value
The JavaScript value is one of the following types of values: Undefined, Null, Boolean, String, Number, or Object.
파일 보기 프로젝트 열기: Taritsyn/MsieJavaScriptEngine 1 사용 예제들

공개 메소드들

메소드 설명
AddRef ( ) : uint

Adds a reference to the object

This only needs to be called on objects that are not going to be stored somewhere on the stack. Calling AddRef ensures that the JavaScript object the value refers to will not be freed until Release is called

CallFunction ( ) : IeJsValue

Invokes a function

Requires an active script context.

ConstructObject ( ) : IeJsValue

Invokes a function as a constructor

Requires an active script context.

ConvertToBoolean ( ) : IeJsValue

Converts a value to Boolean using regular JavaScript semantics

Requires an active script context.

ConvertToNumber ( ) : IeJsValue

Converts a value to Number using regular JavaScript semantics

Requires an active script context.

ConvertToObject ( ) : IeJsValue

Converts a value to Object using regular JavaScript semantics

Requires an active script context.

ConvertToString ( ) : IeJsValue

Converts a value to String using regular JavaScript semantics

Requires an active script context.

CreateArray ( uint length ) : IeJsValue

Creates a JavaScript array object

Requires an active script context

CreateError ( IeJsValue message ) : IeJsValue

Creates a new JavaScript error object

Requires an active script context.

CreateExternalObject ( IntPtr data, JsObjectFinalizeCallback finalizer ) : IeJsValue

Creates a new Object that stores some external data

Requires an active script context.

CreateFunction ( IeJsNativeFunction function ) : IeJsValue

Creates a new JavaScript function

Requires an active script context.

CreateFunction ( IeJsNativeFunction function, IntPtr callbackData ) : IeJsValue

Creates a new JavaScript function

Requires an active script context.

CreateObject ( ) : IeJsValue

Creates a new Object

Requires an active script context.

CreateRangeError ( IeJsValue message ) : IeJsValue

Creates a new JavaScript RangeError error object

Requires an active script context.

CreateReferenceError ( IeJsValue message ) : IeJsValue

Creates a new JavaScript ReferenceError error object

Requires an active script context.

CreateSyntaxError ( IeJsValue message ) : IeJsValue

Creates a new JavaScript SyntaxError error object

Requires an active script context.

CreateTypeError ( IeJsValue message ) : IeJsValue

Creates a new JavaScript TypeError error object

Requires an active script context.

CreateUriError ( IeJsValue message ) : IeJsValue

Creates a new JavaScript URIError error object

Requires an active script context.

DefineProperty ( IeJsPropertyId propertyId, IeJsValue propertyDescriptor ) : bool

Defines a new object's own property from a property descriptor

Requires an active script context.

DeleteIndexedProperty ( IeJsValue index ) : void

Deletes a value at the specified index of an object

Requires an active script context.

DeleteProperty ( IeJsPropertyId propertyId, bool useStrictRules ) : IeJsValue

Deletes a object's property

Requires an active script context.

Equals ( IeJsValue other ) : bool

Compare two JavaScript values for equality

This function is equivalent to the "==" operator in JavaScript.

Requires an active script context.

FromBoolean ( bool value ) : IeJsValue

Creates a Boolean value from a bool value

Requires an active script context.

FromDouble ( double value ) : IeJsValue

Creates a Number value from a double value

Requires an active script context.

FromInt32 ( int value ) : IeJsValue

Creates a Number value from a int value

Requires an active script context.

FromObject ( object value ) : IeJsValue

Creates a JavaScript value that is a projection of the passed in object

Requires an active script context.

FromString ( string value ) : IeJsValue

Creates a String value from a string pointer

Requires an active script context.

GetIndexedProperty ( IeJsValue index ) : IeJsValue

Retrieve a value at the specified index of an object

Requires an active script context.

GetOwnPropertyDescriptor ( IeJsPropertyId propertyId ) : IeJsValue

Gets a property descriptor for an object's own property

Requires an active script context.

GetOwnPropertyNames ( ) : IeJsValue

Gets a list of all properties on the object

Requires an active script context.

GetProperty ( IeJsPropertyId id ) : IeJsValue

Gets a object's property

Requires an active script context.

HasIndexedProperty ( IeJsValue index ) : bool

Test if an object has a value at the specified index

Requires an active script context.

HasProperty ( IeJsPropertyId propertyId ) : bool

Determines whether an object has a property

Requires an active script context.

PreventExtension ( ) : void

Sets a object to not be extensible

Requires an active script context.

Release ( ) : uint

Releases a reference to the object

Removes a reference that was created by AddRef.

SetIndexedProperty ( IeJsValue index, IeJsValue value ) : void

Set a value at the specified index of an object

Requires an active script context.

SetProperty ( IeJsPropertyId id, IeJsValue value, bool useStrictRules ) : void

Sets a object's property

Requires an active script context.

StrictEquals ( IeJsValue other ) : bool

Compare two JavaScript values for strict equality

This function is equivalent to the "===" operator in JavaScript.

Requires an active script context.

ToBoolean ( ) : bool

Retrieves a bool value of a Boolean value

Requires an active script context.

ToDouble ( ) : double

Retrieves a double value of a Number value

This function retrieves the value of a Number value. It will fail with InvalidArgument if the type of the value is not Number.

Requires an active script context.

ToObject ( ) : object

Retrieves a object representation of an Object value

Requires an active script context.

ToString ( ) : string

Retrieves a string pointer of a String value

This function retrieves the string pointer of a String value. It will fail with InvalidArgument if the type of the value is not String.

Requires an active script context.

비공개 메소드들

메소드 설명
IeJsValue ( IntPtr reference ) : System

Initializes a new instance of the IeJsValue struct

메소드 상세

AddRef() 공개 메소드

Adds a reference to the object
This only needs to be called on objects that are not going to be stored somewhere on the stack. Calling AddRef ensures that the JavaScript object the value refers to will not be freed until Release is called
public AddRef ( ) : uint
리턴 uint

CallFunction() 공개 메소드

Invokes a function
Requires an active script context.
public CallFunction ( ) : IeJsValue
리턴 IeJsValue

ConstructObject() 공개 메소드

Invokes a function as a constructor
Requires an active script context.
public ConstructObject ( ) : IeJsValue
리턴 IeJsValue

ConvertToBoolean() 공개 메소드

Converts a value to Boolean using regular JavaScript semantics
Requires an active script context.
public ConvertToBoolean ( ) : IeJsValue
리턴 IeJsValue

ConvertToNumber() 공개 메소드

Converts a value to Number using regular JavaScript semantics
Requires an active script context.
public ConvertToNumber ( ) : IeJsValue
리턴 IeJsValue

ConvertToObject() 공개 메소드

Converts a value to Object using regular JavaScript semantics
Requires an active script context.
public ConvertToObject ( ) : IeJsValue
리턴 IeJsValue

ConvertToString() 공개 메소드

Converts a value to String using regular JavaScript semantics
Requires an active script context.
public ConvertToString ( ) : IeJsValue
리턴 IeJsValue

CreateArray() 공개 정적인 메소드

Creates a JavaScript array object
Requires an active script context
public static CreateArray ( uint length ) : IeJsValue
length uint The initial length of the array
리턴 IeJsValue

CreateError() 공개 정적인 메소드

Creates a new JavaScript error object
Requires an active script context.
public static CreateError ( IeJsValue message ) : IeJsValue
message IeJsValue Message for the error object
리턴 IeJsValue

CreateExternalObject() 공개 정적인 메소드

Creates a new Object that stores some external data
Requires an active script context.
public static CreateExternalObject ( IntPtr data, JsObjectFinalizeCallback finalizer ) : IeJsValue
data System.IntPtr External data that the object will represent. May be null.
finalizer JsObjectFinalizeCallback A callback for when the object is finalized. May be null.
리턴 IeJsValue

CreateFunction() 공개 정적인 메소드

Creates a new JavaScript function
Requires an active script context.
public static CreateFunction ( IeJsNativeFunction function ) : IeJsValue
function IeJsNativeFunction The method to call when the function is invoked
리턴 IeJsValue

CreateFunction() 공개 정적인 메소드

Creates a new JavaScript function
Requires an active script context.
public static CreateFunction ( IeJsNativeFunction function, IntPtr callbackData ) : IeJsValue
function IeJsNativeFunction The method to call when the function is invoked
callbackData System.IntPtr Data to be provided to all function callbacks
리턴 IeJsValue

CreateObject() 공개 정적인 메소드

Creates a new Object
Requires an active script context.
public static CreateObject ( ) : IeJsValue
리턴 IeJsValue

CreateRangeError() 공개 정적인 메소드

Creates a new JavaScript RangeError error object
Requires an active script context.
public static CreateRangeError ( IeJsValue message ) : IeJsValue
message IeJsValue Message for the error object
리턴 IeJsValue

CreateReferenceError() 공개 정적인 메소드

Creates a new JavaScript ReferenceError error object
Requires an active script context.
public static CreateReferenceError ( IeJsValue message ) : IeJsValue
message IeJsValue Message for the error object
리턴 IeJsValue

CreateSyntaxError() 공개 정적인 메소드

Creates a new JavaScript SyntaxError error object
Requires an active script context.
public static CreateSyntaxError ( IeJsValue message ) : IeJsValue
message IeJsValue Message for the error object
리턴 IeJsValue

CreateTypeError() 공개 정적인 메소드

Creates a new JavaScript TypeError error object
Requires an active script context.
public static CreateTypeError ( IeJsValue message ) : IeJsValue
message IeJsValue Message for the error object
리턴 IeJsValue

CreateUriError() 공개 정적인 메소드

Creates a new JavaScript URIError error object
Requires an active script context.
public static CreateUriError ( IeJsValue message ) : IeJsValue
message IeJsValue Message for the error object
리턴 IeJsValue

DefineProperty() 공개 메소드

Defines a new object's own property from a property descriptor
Requires an active script context.
public DefineProperty ( IeJsPropertyId propertyId, IeJsValue propertyDescriptor ) : bool
propertyId IeJsPropertyId The ID of the property
propertyDescriptor IeJsValue The property descriptor
리턴 bool

DeleteIndexedProperty() 공개 메소드

Deletes a value at the specified index of an object
Requires an active script context.
public DeleteIndexedProperty ( IeJsValue index ) : void
index IeJsValue The index to delete
리턴 void

DeleteProperty() 공개 메소드

Deletes a object's property
Requires an active script context.
public DeleteProperty ( IeJsPropertyId propertyId, bool useStrictRules ) : IeJsValue
propertyId IeJsPropertyId The ID of the property
useStrictRules bool The property set should follow strict mode rules
리턴 IeJsValue

Equals() 공개 메소드

Compare two JavaScript values for equality

This function is equivalent to the "==" operator in JavaScript.

Requires an active script context.

public Equals ( IeJsValue other ) : bool
other IeJsValue The object to compare
리턴 bool

FromBoolean() 공개 정적인 메소드

Creates a Boolean value from a bool value
Requires an active script context.
public static FromBoolean ( bool value ) : IeJsValue
value bool The value to be converted
리턴 IeJsValue

FromDouble() 공개 정적인 메소드

Creates a Number value from a double value
Requires an active script context.
public static FromDouble ( double value ) : IeJsValue
value double The value to be converted
리턴 IeJsValue

FromInt32() 공개 정적인 메소드

Creates a Number value from a int value
Requires an active script context.
public static FromInt32 ( int value ) : IeJsValue
value int The value to be converted
리턴 IeJsValue

FromObject() 공개 정적인 메소드

Creates a JavaScript value that is a projection of the passed in object
Requires an active script context.
public static FromObject ( object value ) : IeJsValue
value object The object to be projected
리턴 IeJsValue

FromString() 공개 정적인 메소드

Creates a String value from a string pointer
Requires an active script context.
public static FromString ( string value ) : IeJsValue
value string The string to convert to a String value
리턴 IeJsValue

GetIndexedProperty() 공개 메소드

Retrieve a value at the specified index of an object
Requires an active script context.
public GetIndexedProperty ( IeJsValue index ) : IeJsValue
index IeJsValue The index to retrieve
리턴 IeJsValue

GetOwnPropertyDescriptor() 공개 메소드

Gets a property descriptor for an object's own property
Requires an active script context.
public GetOwnPropertyDescriptor ( IeJsPropertyId propertyId ) : IeJsValue
propertyId IeJsPropertyId The ID of the property
리턴 IeJsValue

GetOwnPropertyNames() 공개 메소드

Gets a list of all properties on the object
Requires an active script context.
public GetOwnPropertyNames ( ) : IeJsValue
리턴 IeJsValue

GetProperty() 공개 메소드

Gets a object's property
Requires an active script context.
public GetProperty ( IeJsPropertyId id ) : IeJsValue
id IeJsPropertyId The ID of the property
리턴 IeJsValue

HasIndexedProperty() 공개 메소드

Test if an object has a value at the specified index
Requires an active script context.
public HasIndexedProperty ( IeJsValue index ) : bool
index IeJsValue The index to test
리턴 bool

HasProperty() 공개 메소드

Determines whether an object has a property
Requires an active script context.
public HasProperty ( IeJsPropertyId propertyId ) : bool
propertyId IeJsPropertyId The ID of the property
리턴 bool

PreventExtension() 공개 메소드

Sets a object to not be extensible
Requires an active script context.
public PreventExtension ( ) : void
리턴 void

Release() 공개 메소드

Releases a reference to the object
Removes a reference that was created by AddRef.
public Release ( ) : uint
리턴 uint

SetIndexedProperty() 공개 메소드

Set a value at the specified index of an object
Requires an active script context.
public SetIndexedProperty ( IeJsValue index, IeJsValue value ) : void
index IeJsValue The index to set
value IeJsValue The value to set
리턴 void

SetProperty() 공개 메소드

Sets a object's property
Requires an active script context.
public SetProperty ( IeJsPropertyId id, IeJsValue value, bool useStrictRules ) : void
id IeJsPropertyId The ID of the property
value IeJsValue The new value of the property
useStrictRules bool The property set should follow strict mode rules
리턴 void

StrictEquals() 공개 메소드

Compare two JavaScript values for strict equality

This function is equivalent to the "===" operator in JavaScript.

Requires an active script context.

public StrictEquals ( IeJsValue other ) : bool
other IeJsValue The object to compare
리턴 bool

ToBoolean() 공개 메소드

Retrieves a bool value of a Boolean value
Requires an active script context.
public ToBoolean ( ) : bool
리턴 bool

ToDouble() 공개 메소드

Retrieves a double value of a Number value

This function retrieves the value of a Number value. It will fail with InvalidArgument if the type of the value is not Number.

Requires an active script context.

public ToDouble ( ) : double
리턴 double

ToObject() 공개 메소드

Retrieves a object representation of an Object value
Requires an active script context.
public ToObject ( ) : object
리턴 object

ToString() 공개 메소드

Retrieves a string pointer of a String value

This function retrieves the string pointer of a String value. It will fail with InvalidArgument if the type of the value is not String.

Requires an active script context.

public ToString ( ) : string
리턴 string