Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CompiledRegexRunnerFactory.cs
Go to the documentation of this file.
2
4
6{
7 private readonly DynamicMethod _goMethod;
8
10
11 private readonly int _trackcount;
12
13 private Action<RegexRunner> _go;
14
15 private Func<RegexRunner, bool> _findFirstChar;
16
17 public CompiledRegexRunnerFactory(DynamicMethod goMethod, DynamicMethod findFirstCharMethod, int trackcount)
18 {
19 _goMethod = goMethod;
20 _findFirstCharMethod = findFirstCharMethod;
21 _trackcount = trackcount;
22 }
23
24 protected internal override RegexRunner CreateInstance()
25 {
26 return new CompiledRegexRunner(_go ?? (_go = _goMethod.CreateDelegate<Action<RegexRunner>>()), _findFirstChar ?? (_findFirstChar = _findFirstCharMethod.CreateDelegate<Func<RegexRunner, bool>>()), _trackcount);
27 }
28}
override Delegate CreateDelegate(Type delegateType)
CompiledRegexRunnerFactory(DynamicMethod goMethod, DynamicMethod findFirstCharMethod, int trackcount)