Exemplo n.º 1
0
        /// <summary>
        /// Creates a <see cref="JSValue"/> representing an array of <see cref="JSValue"/>.
        /// </summary>
        public JSValue(JSValue[] value)
        {
            IntPtr jsarray = JSArrayHelper.CreateArray(value);

            instance = awe_jsvalue_create_array_value(jsarray);
            JSArrayHelper.DestroyArray(jsarray);
        }
Exemplo n.º 2
0
        public string[] GetKeys()
        {
            IntPtr jsArray = awe_jsobject_get_keys(instance);

            uint size = JSArrayHelper.getSize(jsArray);

            string[] result = new string[size];
            for (uint i = 0; i < size; i++)
            {
                JSValue temp = JSArrayHelper.getElement(jsArray, i);
                result[i] = temp.ToString();
            }

            JSArrayHelper.destroyArray(jsArray);

            return(result);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Gets this value as an Array, this will assert if not an Array type.
 /// </summary>
 public JSValue[] GetArray()
 {
     return(JSArrayHelper.getArray(awe_jsvalue_get_array(instance)));
 }