Esempio n. 1
0
 /// <summary>
 /// Creates a <see cref="Microsoft.AspNetCore.Components.RenderFragment"/> which will render a <typeparamref name="TComponent"/> component
 /// with the provided <paramref name="parameters"/> as input, and passes it to the parameter specified in <paramref name="name"/>.
 /// </summary>
 /// <typeparam name="TComponent">The type of the component to render with the <see cref="Microsoft.AspNetCore.Components.RenderFragment"/></typeparam>
 /// <param name="name">Parameter name.</param>
 /// <param name="parameters">Parameters to pass to the <typeparamref name="TComponent"/>.</param>
 /// <returns>The <see cref="ComponentParameter"/>.</returns>
 protected static ComponentParameter RenderFragment <TComponent>(string name, params ComponentParameter[] parameters) where TComponent : class, IComponent
 => ComponentParameterFactory.RenderFragment <TComponent>(name, parameters);
Esempio n. 2
0
 /// <summary>
 /// Creates a <see cref="Microsoft.AspNetCore.Components.RenderFragment"/> with the provided
 /// <paramref name="markup"/> as rendered output and passes it to the parameter specified in <paramref name="name"/>.
 /// </summary>
 /// <param name="name">Parameter name.</param>
 /// <param name="markup">Markup to pass to the render fragment parameter</param>
 /// <returns>The <see cref="ComponentParameter"/>.</returns>
 protected static ComponentParameter RenderFragment(string name, string markup)
 => ComponentParameterFactory.RenderFragment(name, markup);