This site provides a machine-readable index at /llms.txt.

Skip to main content Skip to navigation

LiveReloadScriptProcessor Pennington.Infrastructure

Injects a live reload script into HTML responses during development. Skipped during static build so the output HTML is clean.

Properties

Order int
Execution order; lower values run earlier in the response pipeline.

Methods

ProcessAsync

#
public Task<string> ProcessAsync(string responseBody, HttpContext context);

Transforms responseBody and returns the processed body.

Parameters

responseBody string
context HttpContext

Returns

Task<string>

ShouldProcess

#
public bool ShouldProcess(HttpContext context);

Returns true when this processor should run for the current request.

Parameters

context HttpContext

Returns

bool

Pennington.Infrastructure.LiveReloadScriptProcessor

namespace Pennington.Infrastructure;

/// Injects a live reload script into HTML responses during development. Skipped during static build so the output HTML is clean.
public class LiveReloadScriptProcessor
{
    /// Execution order; lower values run earlier in the response pipeline.
    
public int Order => 20;
/// Transforms responseBody and returns the processed body.
public Task<string> ProcessAsync(string responseBody, HttpContext context);
/// Returns true when this processor should run for the current request.
public bool ShouldProcess(HttpContext context);
}