Class ClientResourceSettings
Required client resource settings
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Framework.Web.Resources
Assembly: EPiServer.Framework.AspNet.dll
Version: 11.20.7Syntax
public class ClientResourceSettings : IEquatable<ClientResourceSettings>
Constructors
ClientResourceSettings(String)
Initializes a new instance of the ClientResourceSettings class. Sets the rendering area to Head.
Declaration
public ClientResourceSettings(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
Properties
Area
Gets or sets the area where required client resource should be rendered.
Declaration
public string Area { get; }
Property Value
Type | Description |
---|---|
System.String | The rendering area. |
Name
Gets or sets the name of required client resource.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String | The name. |
ResourceTypes
Gets or sets the required client resource types.
Declaration
public IEnumerable<ClientResourceType> ResourceTypes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ClientResourceType> | The resource types. |
Methods
AtArea(String)
Requires to place client resource at specified rendering area.
Declaration
public ClientResourceSettings AtArea(string renderingArea)
Parameters
Type | Name | Description |
---|---|---|
System.String | renderingArea | The rendering area. |
Returns
Type | Description |
---|---|
ClientResourceSettings |
AtFooter()
Requires to place client resource at default rendering area Footer.
Declaration
public ClientResourceSettings AtFooter()
Returns
Type | Description |
---|---|
ClientResourceSettings |
AtHeader()
Requires to place client resource at default rendering area Header.
Declaration
public ClientResourceSettings AtHeader()
Returns
Type | Description |
---|---|
ClientResourceSettings |
Equals(ClientResourceSettings)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(ClientResourceSettings other)
Parameters
Type | Name | Description |
---|---|---|
ClientResourceSettings | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the |
Equals(Object)
Determines whether the specified System.Object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with this instance. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
OfTypes(IEnumerable<ClientResourceType>)
Requires client resources of specified types. Does not change settings if specified type list are null or empty colection.
Declaration
public ClientResourceSettings OfTypes(IEnumerable<ClientResourceType> requiredTypes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ClientResourceType> | requiredTypes | The required types of the client resources. |
Returns
Type | Description |
---|---|
ClientResourceSettings |
ScriptsOnly()
Requires script resources only.
Declaration
public ClientResourceSettings ScriptsOnly()
Returns
Type | Description |
---|---|
ClientResourceSettings |
StylesOnly()
Requires CSS resources only.
Declaration
public ClientResourceSettings StylesOnly()
Returns
Type | Description |
---|---|
ClientResourceSettings |