Class RequiredClientResourceList

Client resource manager implementation

Inheritance
System.Object
RequiredClientResourceList
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Framework.Web.Resources
Assembly: EPiServer.Framework.dll
Version: 8.11.0
Syntax
[ServiceConfiguration(ServiceType = typeof(IRequiredClientResourceList), Lifecycle = ServiceInstanceScope.Hybrid)]
public class RequiredClientResourceList : IRequiredClientResourceList, IClientResourceProvider

Constructors

RequiredClientResourceList()

Declaration
public RequiredClientResourceList()

Methods

GetClientResources()

Gets the dynamically requested client resources.

Declaration
public IEnumerable<ClientResource> GetClientResources()
Returns
Type Description
System.Collections.Generic.IEnumerable<ClientResource>

GetRequiredResourcesSettings()

Gets registered required client resources.

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

Require(ClientResource)

Requires the specified client resource.

Declaration
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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
public 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

Implements