Example #1
0
        public T this[int index]
        {
            get
            {
                if (index >= Length)
                {
                    throw new ArgumentOutOfRangeException();
                }

                var jsObject = arrayWrapper.GetProperty(index.ToString());

                var result = context.CreateWrappedJSObject <T>();
                result.JSObject = jsObject;

                return(result);
                //return (T) arrayWrapper.GetProperty(index.ToString());
            }
            set
            {
                if (index >= Length)
                {
                    throw new ArgumentOutOfRangeException();
                }

                arrayWrapper.SetProperty(index.ToString(), value);
            }
        }
        public T this[int index]
        {
            get { return((T)arrayWrapper.GetProperty(index.ToString())); }
            set
            {
                if (index >= Length)
                {
                    throw new ArgumentOutOfRangeException();
                }

                arrayWrapper.SetProperty(index.ToString(), value);
            }
        }
Example #3
0
        JSObjectWrapper GetArrayWrapper()
        {
            if (arrayWrapper == null)
            {
                arrayWrapper = new JSObjectWrapper(Context, Context.CreateJSArray());
                owner.SetProperty(propertyName, arrayWrapper.JSObject);
            }

            return(arrayWrapper);
        }