Beispiel #1
0
        public PatternCompilerTests()
        {
            var services        = new ServiceCollection().AddUrlPattern();
            var serviceProvider = services.BuildServiceProvider();

            compiler = serviceProvider.GetRequiredService <IPatternCompiler>();
        }
Beispiel #2
0
 // This constructor is used by the dependency injection engine
 public PatternEngine(IPatternCompiler compiler, IPatternMatcher matcher)
 {
     this.compiler = CheckValue(compiler, nameof(compiler));
     this.matcher  = CheckValue(matcher, nameof(matcher));
 }
Beispiel #3
0
 public PatternEngine()
 {
     compiler = new PatternCompiler(new PatternTypeResolver(), new PatternParser(), new PatternValidator());
     matcher  = new PatternMatcher();
 }