November Happy Hour will be moved to Thursday December 5th.

Class RequestOrFactory<T>

Helper class to store variables that should be cached on HTTP context.

Inheritance
System.Object
RequestOrFactory<T>
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.ServiceLocation
Assembly: EPiServer.Framework.dll
Version: 9.12.2
Syntax
public class RequestOrFactory<T>
Type Parameters
Name Description
T

Constructors

RequestOrFactory(Func<T>, IRequestCache)

Constructs an instance of RequestOrFactory<T>

Declaration
public RequestOrFactory(Func<T> valueFactory, IRequestCache requestCache)
Parameters
Type Name Description
System.Func<T> valueFactory

The factory to get not cached value

IRequestCache requestCache

The request cache to use

Properties

Value

Accessor to get value from cache or factory (if not cached)

Declaration
public T Value { get; }
Property Value
Type Description
T

Extension Methods