SetDelegates() private method

private SetDelegates ( NoParamDelegate go, FindFirstCharDelegate firstChar, NoParamDelegate trackCount ) : void
go NoParamDelegate
firstChar FindFirstCharDelegate
trackCount NoParamDelegate
return void
        protected internal override RegexRunner CreateInstance()
        {
            CompiledRegexRunner runner = new CompiledRegexRunner();

            new ReflectionPermission(PermissionState.Unrestricted).Assert();
            runner.SetDelegates((NoParamDelegate)this.goMethod.CreateDelegate(typeof(NoParamDelegate)), (FindFirstCharDelegate)this.findFirstCharMethod.CreateDelegate(typeof(FindFirstCharDelegate)), (NoParamDelegate)this.initTrackCountMethod.CreateDelegate(typeof(NoParamDelegate)));
            return(runner);
        }
Exemplo n.º 2
0
        protected internal override RegexRunner CreateInstance()
        {
            CompiledRegexRunner runner = new CompiledRegexRunner();

            runner.SetDelegates((Action <RegexRunner>)_goMethod.CreateDelegate(typeof(Action <RegexRunner>)),
                                (Func <RegexRunner, bool>)_findFirstCharMethod.CreateDelegate(typeof(Func <RegexRunner, bool>)),
                                (Action <RegexRunner>)_initTrackCountMethod.CreateDelegate(typeof(Action <RegexRunner>)));

            return(runner);
        }
        protected internal override RegexRunner CreateInstance() {
            CompiledRegexRunner runner = new CompiledRegexRunner();

            new ReflectionPermission(PermissionState.Unrestricted).Assert();
            runner.SetDelegates((NoParamDelegate)       goMethod.CreateDelegate(typeof(NoParamDelegate)),
                                (FindFirstCharDelegate) findFirstCharMethod.CreateDelegate(typeof(FindFirstCharDelegate)),
                                (NoParamDelegate)       initTrackCountMethod.CreateDelegate(typeof(NoParamDelegate)));

            return runner;
        }