Delete() public method

public Delete ( ) : void
return void
示例#1
0
        public virtual void Delete(string index)
        {
            Descriptor result = (Descriptor)null;

            if (!this.TryGetDescriptor(index, out result) || result.Owner != this)
            {
                return;
            }
            if (!result.Configurable)
            {
                throw new JintException("Property " + index + " isn't configurable");
            }
            this.properties.Delete(index);
            result.Delete();
            --this.m_length;
        }
示例#2
0
        public virtual void Delete(string index)
        {
            Descriptor d = null;

            if (TryGetDescriptor(index, out d) && d.Owner == this)
            {
                if (d.Configurable)
                {
                    properties.Delete(index);
                    d.Delete();
                    m_length--;
                }
                else
                {
                    throw new JintException("Property " + index + " isn't configurable");
                }
            }
        }