public Component FindComponent(HtmlNode node, HttpContext context) { var component = _types.Single(x => x.Name.ToLower() == $"{node.Name.ToLower()}component"); var instance = _provider.CreateComponent(component, node, context); return(instance); }
public Component FindComponent(HtmlNode node) { var component = _types.Single(x => x.Name.ToLower() == $"{node.Name.ToLower()}component"); var instance = (Component)_provider.GetRequiredService(component); instance.HtmlElement = node; return(instance); }