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