System.Text.RegularExpressions.PatternCompiler.MakeFlags C# (CSharp) Method

MakeFlags() private static method

private static MakeFlags ( bool negate, bool ignore, bool reverse, bool lazy ) : OpFlags
negate bool
ignore bool
reverse bool
lazy bool
return OpFlags
		private static OpFlags MakeFlags (bool negate, bool ignore, bool reverse, bool lazy) {
			OpFlags flags = 0;
			if (negate) flags |= OpFlags.Negate;
			if (ignore) flags |= OpFlags.IgnoreCase;
			if (reverse) flags |= OpFlags.RightToLeft;
			if (lazy) flags |= OpFlags.Lazy;

			return flags;
		}
		

Usage Example

示例#1
0
        public void EmitSet(char lo, BitArray set, bool negate, bool ignore, bool reverse)
        {
            this.Emit(OpCode.Set, PatternCompiler.MakeFlags(negate, ignore, reverse, false));
            this.Emit((ushort)lo);
            int num = set.Length + 15 >> 4;

            this.Emit((ushort)num);
            int num2 = 0;

            while (num-- != 0)
            {
                ushort num3 = 0;
                for (int i = 0; i < 16; i++)
                {
                    if (num2 >= set.Length)
                    {
                        break;
                    }
                    if (set[num2++])
                    {
                        num3 |= (ushort)(1 << i);
                    }
                }
                this.Emit(num3);
            }
        }
All Usage Examples Of System.Text.RegularExpressions.PatternCompiler::MakeFlags