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.3Syntax
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. |
uniqueId | The unique id for this instance |
System. |
valueFactory | The factory to get not cached value |
IRequest |
requestCache | The request cache to use |
Properties
UniqueId
The unique id for this instance
Declaration
public Guid UniqueId { get; }
Property Value
Type | Description |
---|---|
System. |
Value
Accessor to get value from cache or factory (if not cached)
Declaration
public T Value { get; }
Property Value
Type | Description |
---|---|
T |