Class ExpressionCache
Implementation of ICachesCSharpExpressions which uses a System.Runtime.Caching.MemoryCache as the backing store.
Inheritance
System.Object
ExpressionCache
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ZptSharp.Expressions.CSharpExpressions
Assembly: ZptSharp.CSharpExpressions.dll
Syntax
public class ExpressionCache : ICachesCSharpExpressions
Methods
| Improve this Doc View SourceAddExpression(ExpressionDescription, CSharpExpression)
Adds a compiled C# expression to the cache.
Declaration
public void AddExpression(ExpressionDescription description, CSharpExpression expression)
Parameters
Type | Name | Description |
---|---|---|
ExpressionDescription | description | An object which uniquely identifies the expression. |
CSharpExpression | expression | The compiled C# expression. |
GetExpression(ExpressionDescription)
Gets a compiled C# expression from the cache, or a null reference if there is no expression in the cache matching the identifier.
Declaration
public CSharpExpression GetExpression(ExpressionDescription description)
Parameters
Type | Name | Description |
---|---|---|
ExpressionDescription | description | An identifier for a compiled C# expression. |
Returns
Type | Description |
---|---|
CSharpExpression | A C# expression, or a null reference if the expression is not found. |