NoteCaptures() private method

private NoteCaptures ( Hashtable caps, int capsize, Hashtable capnames ) : void
caps System.Collections.Hashtable
capsize int
capnames System.Collections.Hashtable
return void
Ejemplo n.º 1
0
        /*
         * This static call constructs a flat concatenation node given
         * a replacement pattern.
         */
        internal static RegexReplacement ParseReplacement(String rep, Hashtable caps, int capsize, Hashtable capnames, RegexOptions op)
        {
            RegexParser p;
            RegexNode root;

            p = new RegexParser((op & RegexOptions.CultureInvariant) != 0 ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture);

            p._options = op;

            p.NoteCaptures(caps, capsize, capnames);
            p.SetPattern(rep);
            root = p.ScanReplacement();

            return new RegexReplacement(rep, root, caps);
        }
 internal static RegexReplacement ParseReplacement(string rep, Hashtable caps, int capsize, Hashtable capnames, RegexOptions op)
 {
     RegexParser parser = new RegexParser(((op & RegexOptions.CultureInvariant) != RegexOptions.None) ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture) {
         _options = op
     };
     parser.NoteCaptures(caps, capsize, capnames);
     parser.SetPattern(rep);
     return new RegexReplacement(rep, parser.ScanReplacement(), caps);
 }
Ejemplo n.º 3
0
 internal static RegexReplacement ParseReplacement(string rep, System.Collections.Generic.Dictionary<object,object> caps,
     int capsize, System.Collections.Generic.Dictionary<object,object> capnames, RegexOptions op)
 {
     RegexParser parser = new RegexParser(((op & RegexOptions.CultureInvariant) != RegexOptions.None) ? CultureInfo.InvariantCulture : CultureInfo.CurrentCulture);
     parser.NoteCaptures(caps, capsize, capnames);
     parser.SetPattern(rep);
     return new RegexReplacement(rep, parser.ScanReplacement(), caps);
 }