Beispiel #1
0
 private Func <object, string> GetCompiled(object specimen)
 => _compiled.GetOrAdd(Type.GetTypeHandle(specimen), rth => TemplateCompiler.Compile(_template, rth));
Beispiel #2
0
 public UrlTemplate(string template)
 {
     Template  = template ?? throw new ArgumentNullException(nameof(template));
     _compiled = TemplateCompiler.Compile <T>(RawUriTemplate.Parse(template));
 }