Table of Contents

Class SpaConfiguration

Namespace
OpenSettings.Configurations
Assembly
OpenSettings.dll

Represents the configuration options for the open settings Spa page.

This class allows customization of various settings related to the page behavior and appearance.

It includes properties for managing the index stream and document title, among other settings.

public class SpaConfiguration
Inheritance
SpaConfiguration
Inherited Members

Properties

DocumentTitle

Gets or sets the title of the document for the open settings page.

This title is used in the HTML document's title element and will be displayed in the browser's title bar.

public string DocumentTitle { get; set; }

Property Value

string

Remarks

The default value is 'OpenSettings Spa'.

IndexStream

Gets or sets a function that returns a Stream representing the index HTML file for the open settings spa.

This function retrieves the embedded resource stream for the specified HTML file.

The default implementation uses the OpenSettings.AspNetCore.Spa type's assembly to access the embedded resource.

public Func<Stream> IndexStream { get; set; }

Property Value

Func<Stream>

IsActive

Gets or sets a value indicating whether the open settings Spa (Single Page Application) is active. The default value is true.

public bool IsActive { get; set; }

Property Value

bool

Remarks

Setting this property to true does not guarantee that the Spa will be accessible. Make sure to register AddOpenSettingsController(...) and app.UseOpenSettings(...) after UseRouting() and before UseEndpoints().

RoutePrefix

Specifies the prefix used to access the open settings Spa page.

With this prefix, the open settings Spa page can be accessed through the defined route.

public string RoutePrefix { get; set; }

Property Value

string

Remarks

The default value is 'settings'.