internal static bool VerifyType(string tagName, Type componentType, out string error) { if (!LaraUI.TryGetComponent(tagName, out var type)) { error = $"The tag '{tagName}' is not registered as web component. To register a webcomponent, either (1) decorate it with [LaraWebComponent] and run LaraUI.PublishAssemblies(), or (2) use LaraUI.Publish()."; return(false); } if (type != componentType) { error = $"The tag '{tagName}' is registered with the type '{type.FullName}' and not '{componentType.FullName}'."; return(false); } error = string.Empty; return(true); }
private static bool FindTagName(string tagName, [NotNullWhen(true)] out Type?type) { return(_Map.TryGetValue(tagName, out type) || LaraUI.TryGetComponent(tagName, out type)); }