Table of Contents

Class CacheManager

Namespace
ICSharpCode.Decompiler.Util
Assembly
ICSharpCode.Decompiler.dll

Allows caching values for a specific compilation. A CacheManager consists of a for shared instances (shared among all threads working with that resolve context).

public sealed class CacheManager
Inheritance
CacheManager
Inherited Members

Remarks

This class is thread-safe

Constructors

CacheManager()

public CacheManager()

Methods

GetOrAddShared(object, Func<object, object>)

public object GetOrAddShared(object key, Func<object, object> valueFactory)

Parameters

key object
valueFactory Func<object, object>

Returns

object

GetOrAddShared(object, object)

public object GetOrAddShared(object key, object value)

Parameters

key object
value object

Returns

object

GetShared(object)

public object? GetShared(object key)

Parameters

key object

Returns

object

SetShared(object, object)

public void SetShared(object key, object value)

Parameters

key object
value object