Class LoaderOptions
Specifies the options to use when loading content.
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.Core
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class LoaderOptions : IEnumerable<LoaderOption>, IEnumerable
Constructors
LoaderOptions()
Declaration
public LoaderOptions()
Methods
Add<T>(T)
Adds a LoaderOption to be used during content loading.
Declaration
public LoaderOptions Add<T>(T option)
where T : LoaderOption
Parameters
Type | Name | Description |
---|---|---|
T | option | The option to add. |
Returns
Type | Description |
---|---|
LoaderOptions | The LoaderOptions instance. |
Type Parameters
Name | Description |
---|---|
T |
Remarks
If an option of the type already exist that will be returned from Get. To replace an existing option use Setup
Get<T>()
Gets the first option of specified LoaderOption.
Declaration
public T Get<T>()
Returns
Type | Description |
---|---|
T | The option if it exist, else null. |
Type Parameters
Name | Description |
---|---|
T | The type of option. |
Setup<T>(Action<T>)
Configures the option of type T.
Declaration
public LoaderOptions Setup<T>(Action<T> action)
where T : LoaderOption, new()
Parameters
Type | Name | Description |
---|---|---|
System.Action<T> | action | A delegate to configure option. |
Returns
Type | Description |
---|---|
LoaderOptions | The LoaderOptions instance. |
Type Parameters
Name | Description |
---|---|
T | The type of option. |
Remarks
If the option already exist it is passed to action
else a new option is created.
Explicit Interface Implementations
IEnumerable<LoaderOption>.GetEnumerator()
Declaration
IEnumerator<LoaderOption> IEnumerable<LoaderOption>.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<LoaderOption> |
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable