protected override void BuildRenderTree(RenderTreeBuilder builder) { if (resolvedType is Type) { builder.OpenComponent(0, resolvedType); if (AdditionalAttributes.Any()) { builder.AddMultipleAttributes(1, AdditionalAttributes); } builder.CloseComponent(); } }
protected override void BuildRenderTree(RenderTreeBuilder builder) { if (Component is T) { int index = -1; builder.OpenComponent(++index, Component.GetType()); if (AdditionalAttributes?.Any() ?? false) { builder.AddMultipleAttributes(++index, AdditionalAttributes); } builder.CloseComponent(); } }