Class ClientResourceService

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

Inheritance
System.Object
ClientResourceService
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(IClientResourceService), Lifecycle = ServiceInstanceScope.Hybrid)]
public class ClientResourceService : IClientResourceService

Constructors

ClientResourceService(IClientResourceProvider[], IClientResourceRegister[], IRequiredClientResourceList, EPiServerFrameworkSection)

Initializes a new instance of the ClientResourceService class.

Declaration
public ClientResourceService(IClientResourceProvider[] clientResourceProviders, IClientResourceRegister[] clientResourceRegisters, IRequiredClientResourceList requiredResources, EPiServerFrameworkSection configSection)
Parameters
Type Name Description
IClientResourceProvider[] clientResourceProviders

The client resource providers.

IClientResourceRegister[] clientResourceRegisters

The client resource registers.

IRequiredClientResourceList requiredResources

The list of required client resources.

EPiServerFrameworkSection configSection

The EPiServer Framework configuration section.

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>

RegisterRequiredResources(HttpContextBase)

Performs the registration of the required client resources.

Declaration
public void RegisterRequiredResources(HttpContextBase context)
Parameters
Type Name Description
System.Web.HttpContextBase context

The HTTP context.

Implements