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 RequestOrFactory<T>

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

Inheritance
System.Object
RequestOrFactory<T>
Namespace: EPiServer.ServiceLocation.Internal
Assembly: EPiServer.Framework.dll
Version: 12.0.3
Syntax
public class RequestOrFactory<T> : Object
Type Parameters
Name Description
T

Constructors

RequestOrFactory(Guid, Func<T>, IRequestCache)

Constructs an instance of RequestOrFactory<T>

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

The unique id for this instance

System.Func<T> valueFactory

The factory to get not cached value

IRequestCache requestCache

The request cache to use

Properties

UniqueId

The unique id for this instance

Declaration
public Guid UniqueId { get; }
Property Value
Type Description
System.Guid

Value

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

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

Extension Methods