コード例 #1
0
ファイル: UrlTemplate.cs プロジェクト: wangzhefeng2000/Clay-1
 private Func <object, string> GetCompiled(object specimen)
 => _compiled.GetOrAdd(Type.GetTypeHandle(specimen), rth => TemplateCompiler.Compile(_template, rth));
コード例 #2
0
ファイル: UrlTemplateOfT.cs プロジェクト: fgcp020/Clay
 public UrlTemplate(string template)
 {
     Template  = template ?? throw new ArgumentNullException(nameof(template));
     _compiled = TemplateCompiler.Compile <T>(RawUriTemplate.Parse(template));
 }