Class HybridHttpOrThreadLocal<T>

Helper class to store variables that should be cached either on HTTP context or on thread local storage

Inheritance
System.Object
HybridHttpOrThreadLocal<T>
Implements
System.IDisposable
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 HybridHttpOrThreadLocal<T> : IDisposable
Type Parameters
Name Description
T

Constructors

HybridHttpOrThreadLocal(Func<T>, IRequestCache)

Creates new instance of HybridHttpOrThreadLocal<T>

Declaration
public HybridHttpOrThreadLocal(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

Methods

Dispose()

Declaration
public void Dispose()

Dispose(Boolean)

Dispose implementation

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

indicate if disposing

Implements

System.IDisposable

Extension Methods