System.Xml.Schema.BitSet.Or C# (CSharp) Méthode

Or() public méthode

public Or ( BitSet other ) : void
other BitSet
Résultat void
        public void Or(BitSet other) {
            if (this == other) {
                return;
            }
            int setLength = other.bits.Length;
            EnsureLength(setLength);
            for (int i = setLength; i-- > 0 ;) {
                bits[i] |= other.bits[i];
            }
        }

Usage Example

Exemple #1
0
        public override object ValidateElement(XmlQualifiedName name, ValidationState context, out int errorCode)
        {
            BitSet set   = context.CurPos[context.CurrentState.CurPosIndex];
            int    index = (context.CurrentState.CurPosIndex + 1) % 2;
            BitSet set2  = context.CurPos[index];

            set2.Clear();
            int    num2     = this.symbols[name];
            object particle = null;

            errorCode = 0;
            for (int i = set.NextSet(-1); i != -1; i = set.NextSet(i))
            {
                if (num2 == this.positions[i].symbol)
                {
                    set2.Or(this.followpos[i]);
                    particle = this.positions[i].particle;
                    break;
                }
            }
            if (!set2.IsEmpty)
            {
                context.CurrentState.CurPosIndex = index;
                return(particle);
            }
            if (!base.IsOpen || !set[this.endMarkerPos])
            {
                context.NeedValidateChildren = false;
                errorCode = -1;
            }
            return(null);
        }
All Usage Examples Of System.Xml.Schema.BitSet::Or