public bool TryGet <T>(TemplateContent <T> content, out T result) { if (_accessors.TryGetValue(content, out var methodInfo)) { result = (T)methodInfo.Invoke(); return(true); } result = default; return(false); }
protected void RegisterContent <T>(TemplateContent <T> content, Func <T> accesor) { _accessors[content] = () => accesor(); }