예제 #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)));
        }