Пример #1
0
        public virtual NSJSValue RemoveAt(int index)
        {
            if (index < 0 || index >= this.Length)
            {
                throw new ArgumentOutOfRangeException("value");
            }
            NSJSFunction splice = (NSJSFunction)base.Get("splice");

            return(splice.Call(NSJSInt32.New(this.VirtualMachine, index)));
        }
Пример #2
0
        public virtual int IndexOf(NSJSValue value)
        {
            if (value == null)
            {
                return(-1);
            }
            NSJSFunction indexOf = (NSJSFunction)base.Get("indexOf");
            NSJSInt32    result  = indexOf.Call(value) as NSJSInt32;

            if (result == null)
            {
                return(-1);
            }
            return(result.Value);
        }
Пример #3
0
 public void Add(int value)
 {
     this.Add((NSJSValue)NSJSInt32.New(this.VirtualMachine, value));
 }
Пример #4
0
        public virtual NSJSValue Clear()
        {
            NSJSFunction splice = (NSJSFunction)base.Get("splice");

            return(splice.Call(NSJSInt32.New(this.VirtualMachine, 0), NSJSInt32.New(this.VirtualMachine, this.Length)));
        }