November Happy Hour will be moved to Thursday December 5th.

Interface IRequiredClientResourceList

Provides methods to register required client resource and get information about registered items.

Namespace: EPiServer.Framework.Web.Resources
Assembly: EPiServer.Framework.dll
Version: 10.10.4
Syntax
public interface IRequiredClientResourceList : IClientResourceProvider

Methods

GetRequiredResourcesSettings()

Gets registered required client resources.

Declaration
IEnumerable<ClientResourceSettings> GetRequiredResourcesSettings()
Returns
Type Description
System.Collections.Generic.IEnumerable<ClientResourceSettings>

Require(ClientResource)

Requires the specified client resource.

Declaration
ClientResourceSettings Require(ClientResource clientResource)
Parameters
Type Name Description
ClientResource clientResource

The client resource.

Returns
Type Description
ClientResourceSettings

Require(String)

Requires the client resource with specified name.

Declaration
ClientResourceSettings Require(string clientResourceName)
Parameters
Type Name Description
System.String clientResourceName

Name of the client resource.

Returns
Type Description
ClientResourceSettings

Require(String, String, String, ClientResourceType, IEnumerable<String>, Int32, Boolean)

Requires the client resource with specified properties.

Declaration
ClientResourceSettings Require(string path, string inlineContent, string name, ClientResourceType resourceType, IEnumerable<string> dependencies, int sortIndex, bool isMinified)
Parameters
Type Name Description
System.String path

The client resource virtual path path or URL.

System.String inlineContent

Content of the inline client resource that does not reference any path.

System.String name

The client resource name.

ClientResourceType resourceType

The client resource type.

System.Collections.Generic.IEnumerable<System.String> dependencies

The names of other client resources that this resource depends on.

System.Int32 sortIndex

Sort index for this client resource within the group with the same name.

System.Boolean isMinified

Indicates whether the content of the client resource is minified.

Returns
Type Description
ClientResourceSettings

RequireHtmlInline(String)

Requires the inline HTML injection.

Declaration
ClientResourceSettings RequireHtmlInline(string inlineContent)
Parameters
Type Name Description
System.String inlineContent

Inline injection content.

Returns
Type Description
ClientResourceSettings

RequireHtmlInline(String, String, IEnumerable<String>)

Requires the inline HTML injection.

Declaration
ClientResourceSettings RequireHtmlInline(string inlineContent, string name, IEnumerable<string> dependencies)
Parameters
Type Name Description
System.String inlineContent

Inline injection content.

System.String name

The client resource name.

System.Collections.Generic.IEnumerable<System.String> dependencies

The names of other client resources that this resource depends on.

Returns
Type Description
ClientResourceSettings

RequireScript(String)

Requires the JavaScript resource with specified path.

Declaration
ClientResourceSettings RequireScript(string scriptPath)
Parameters
Type Name Description
System.String scriptPath

The script resource virtual path path or URL.

Returns
Type Description
ClientResourceSettings

RequireScript(String, String, IEnumerable<String>)

Requires the JavaScript resource with specified path.

Declaration
ClientResourceSettings RequireScript(string scriptPath, string name, IEnumerable<string> dependencies)
Parameters
Type Name Description
System.String scriptPath

The script resource virtual path path or URL.

System.String name

The client resource name.

System.Collections.Generic.IEnumerable<System.String> dependencies

The names of other client resources that this script depends on.

Returns
Type Description
ClientResourceSettings

RequireScriptInline(String)

Requires the inline JavaScript.

Declaration
ClientResourceSettings RequireScriptInline(string scriptContent)
Parameters
Type Name Description
System.String scriptContent

Inline script content.

Returns
Type Description
ClientResourceSettings

RequireScriptInline(String, String, IEnumerable<String>)

Requires the inline JavaScript.

Declaration
ClientResourceSettings RequireScriptInline(string scriptContent, string name, IEnumerable<string> dependencies)
Parameters
Type Name Description
System.String scriptContent

Inline script content.

System.String name

The client resource name.

System.Collections.Generic.IEnumerable<System.String> dependencies

The names of other client resources that this script depends on.

Returns
Type Description
ClientResourceSettings

RequireStyle(String)

Requires the CSS resource with specified path.

Declaration
ClientResourceSettings RequireStyle(string cssPath)
Parameters
Type Name Description
System.String cssPath

The CSS resource virtual path path or URL.

Returns
Type Description
ClientResourceSettings

RequireStyle(String, String, IEnumerable<String>)

Requires the CSS resource with specified path.

Declaration
ClientResourceSettings RequireStyle(string cssPath, string name, IEnumerable<string> dependencies)
Parameters
Type Name Description
System.String cssPath

The CSS resource virtual path path or URL.

System.String name

The client resource name.

System.Collections.Generic.IEnumerable<System.String> dependencies

The names of other client resources that this CSS resource depends on.

Returns
Type Description
ClientResourceSettings

RequireStyleInline(String)

Requires the inline CSS block.

Declaration
ClientResourceSettings RequireStyleInline(string cssContent)
Parameters
Type Name Description
System.String cssContent

CSS content.

Returns
Type Description
ClientResourceSettings

RequireStyleInline(String, String, IEnumerable<String>)

Requires the inline CSS block.

Declaration
ClientResourceSettings RequireStyleInline(string cssContent, string name, IEnumerable<string> dependencies)
Parameters
Type Name Description
System.String cssContent

CSS content.

System.String name

The client resource name.

System.Collections.Generic.IEnumerable<System.String> dependencies

The names of other client resources that this CSS resource depends on.

Returns
Type Description
ClientResourceSettings

Extension Methods