internal RegexReplacement(string rep, RegexNode concat, System.Collections.Generic.Dictionary<object,object> _caps)
{
this._rep = rep;
if (concat.Type() != 0x19)
{
throw new ArgumentException(RegExRes.GetString(0x25));
}
StringBuilder builder = new StringBuilder();
ArrayList list = new ArrayList();
ArrayList list2 = new ArrayList();
for (int i = 0; i < concat.ChildCount(); i++)
{
RegexNode node = concat.Child(i);
switch (node.Type())
{
case 9:
{
builder.Append(node._ch);
continue;
}
case 12:
{
builder.Append(node._str);
continue;
}
case 13:
{
if (builder.Length > 0)
{
list2.Add(list.Count);
list.Add(builder.ToString());
builder.Length = 0;
}
int num = node._m;
if ((_caps != null) && (num >= 0))
{
num = (int) _caps[num];
}
list2.Add(-5 - num);
continue;
}
}
throw new ArgumentException(RegExRes.GetString(0x25));
}
if (builder.Length > 0)
{
list2.Add(list.Count);
list.Add(builder.ToString());
}
this._strings = new string[list.Count];
list.CopyTo(0, this._strings, 0, list.Count);
this._rules = new int[list2.Count];
for (int j = 0; j < list2.Count; j++)
{
this._rules[j] = (int) list2[j];
}
}