Show / Hide Table of Contents

Class SimpleCompiledDelegateCache

Simple compiled delegate cache with unbounded size.

Inheritance
System.Object
SimpleCompiledDelegateCache
Implements
ICompiledDelegateCache
Namespace: System.Linq.Expressions
Assembly: Nuqleon.Linq.CompilerServices.dll
Syntax
public class SimpleCompiledDelegateCache : Object, ICompiledDelegateCache

Constructors

SimpleCompiledDelegateCache()

Creates a new delegate cache.

Declaration
public SimpleCompiledDelegateCache()

Properties

Count

Gets the number of entries in the cache.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

Methods

Clear()

Clears the cache.

Declaration
public void Clear()

GetOrAdd(LambdaExpression)

Gets a compiled delegate from the cache if the specified lambda expression already has been compiled. Otherwise, compiles the lambda expression to a delegate and stores the result.

Declaration
public Delegate GetOrAdd(LambdaExpression expression)
Parameters
Type Name Description
System.Linq.Expressions.LambdaExpression expression

Lambda expression to look up in the cache.

Returns
Type Description
System.Delegate

Compiled delegate to execute the lambda expression.

Implements

ICompiledDelegateCache
In This Article
Back to top Generated by DocFX