SpaPageDataService Pennington.Islands
Assembles SPA page data by coordinating island renderers.
Constructors
.ctor
#public SpaPageDataService(IEnumerable<IIslandRenderer> renderers, RenderContext renderContext);Creates a service coordinating the supplied island renderers under the given render context.
Parameters
renderersIEnumerable<IIslandRenderer>renderContextRenderContext
Methods
GetPageDataAsync
#public async Task<SpaEnvelopeDto?> GetPageDataAsync(ContentRoute route, string title, string? description = null);Get the SPA envelope for a given route. Returns null if no renderers produce content.
Parameters
routeContentRoutetitlestringdescriptionstring? (optional)
Returns
Task<SpaEnvelopeDto?>Pennington.Islands.SpaPageDataService
namespace Pennington.Islands;
/// Assembles SPA page data by coordinating island renderers.
public class SpaPageDataService
{
/// Creates a service coordinating the supplied island renderers under the given render context.
public SpaPageDataService(IEnumerable<IIslandRenderer> renderers, RenderContext renderContext);
/// Get the SPA envelope for a given route. Returns null if no renderers produce content.
public async Task<SpaEnvelopeDto?> GetPageDataAsync(ContentRoute route, string title, string? description = null);
}