コード例 #1
0
ファイル: JSTypedArray.cs プロジェクト: icyair100/JabRef4Word
        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);
            }
        }
コード例 #2
0
        public T this[int index]
        {
            get { return((T)arrayWrapper.GetProperty(index.ToString())); }
            set
            {
                if (index >= Length)
                {
                    throw new ArgumentOutOfRangeException();
                }

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

            return(arrayWrapper);
        }