Nucleus .Net Core CMS

Models.ClientResources.ClientResources Class

Namespace: Nucleus.Abstractions.Models.ClientResources
Assembly: Nucleus.Abstractions.dll
Class used to store a list of client resources (scripts, stylesheets and web assemblies) which are used by a page.
This class is used by the AddScript, AddStyle and AddWebAssembly Html Helpers in Nucleus.ViewFeatures.
Allowed sources for Content Security Policy for the page, used to control which resources can be loaded by the browser.
A list of scripts to add to the current page output.
Flag which is set by LockScripts to signal that no more scripts should be added.
A list of stylesheets to add to the current page output.
Flag which is set by LockStyles to signal that no more scripts should be added.
A list of Web Assemblies to dynamically load.
Key for page resources object in HttpContext.Items
LockScripts ()
Sets a flag to prevent any more scripts from being added to the Scripts list.
Remarks
This method is used in special-case scenarios for applications which need to take full control over the scripts which are included in the response.
LockStyles ()
Sets a flag to prevent any more stylesheets from being added to the StyleSheets list.
Remarks
This method is used in special-case scenarios for applications which need to take full control over the stylesheets which are included in the response.