Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class ClientResourceService

Performs the registrations of required client resources by calling available IClientResourceRegistrator instances. Provides the list of required client resources combined in bundles.

Inheritance
System.Object
ClientResourceService
Namespace: EPiServer.Framework.Web.Resources.Internal
Assembly: EPiServer.Framework.AspNetCore.dll
Version: 12.0.3
Syntax
public class ClientResourceService : Object, IClientResourceService

Constructors

ClientResourceService(IEnumerable<IClientResourceProvider>, IEnumerable<IClientResourceRegistrator>, IRequiredClientResourceList, ClientResourceOptions)

Initializes a new instance of the ClientResourceService class.

Declaration
public ClientResourceService(IEnumerable<IClientResourceProvider> clientResourceProviders, IEnumerable<IClientResourceRegistrator> clientResourceRegisters, IRequiredClientResourceList requiredResources, ClientResourceOptions options)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IClientResourceProvider> clientResourceProviders

The client resource providers.

System.Collections.Generic.IEnumerable<IClientResourceRegistrator> clientResourceRegisters

The client resource registers.

IRequiredClientResourceList requiredResources

The list of required client resources.

ClientResourceOptions options

The client resource options.

Properties

ClientResourceRegisters

Declaration
public IList<IClientResourceRegistrator> ClientResourceRegisters { get; }
Property Value
Type Description
System.Collections.Generic.IList<IClientResourceRegistrator>

RequiredClientResourceList

Declaration
public IRequiredClientResourceList RequiredClientResourceList { get; }
Property Value
Type Description
IRequiredClientResourceList

Methods

GetClientResources(String)

Gets all ClientResource from all IClientResourceProvider in the system and dynamically requested resources.

Declaration
public IEnumerable<ClientResource> GetClientResources(string name)
Parameters
Type Name Description
System.String name

Client resources name.

Returns
Type Description
System.Collections.Generic.IEnumerable<ClientResource>

All available resources with specified name

GetClientResources(String, ClientResourceType[])

Gets all ClientResource from all IClientResourceProvider in the system and dynamically requested resources.

Declaration
public IEnumerable<ClientResource> GetClientResources(string name, ClientResourceType[] resourceTypes)
Parameters
Type Name Description
System.String name

Client resources name.

ClientResourceType[] resourceTypes

Only get resources for these types.

Returns
Type Description
System.Collections.Generic.IEnumerable<ClientResource>

All available resources with specified name

GetRequiredResources(String)

Gets the required client resources for specified rendering area.

Declaration
public IEnumerable<ClientResource> GetRequiredResources(string renderingArea)
Parameters
Type Name Description
System.String renderingArea

The rendering area.

Returns
Type Description
System.Collections.Generic.IEnumerable<ClientResource>

Implements

Extension Methods