Skip to content

Commit bea8b66

Browse files
Update eval-manager.md
1 parent 8e7f732 commit bea8b66

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

docs/pages/api/eval-manager.md

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,47 @@
11
---
22
layout: default
33
title: Eval Manager
4+
description: Static manager class for options shared between all instances.
45
permalink: eval-manager
56
---
67

78
{% include template-h1.html %}
89

9-
## Introduction
10-
The EvalManager static class keep global configuration shared between evaluation instance.
10+
## Description
11+
{{ page.description }}
1112

1213
## Cache
13-
### Problem
14-
You want to use your own cache to cache compiled lambda expression.
15-
16-
### Solution
17-
You can change the shared cache by any cache inheriting from System.Runtime.Caching.ObjectCache class.
14+
Gets or sets the cache to use to cache compiled delegate.
1815

1916
### Example
20-
```csharp
17+
{% highlight csharp %}
2118
// using Z.Expressions; // Don't forget to include this.
2219
EvalManager.Cache = MemoryCache.Default;
23-
```
20+
{% endhighlight %}
2421

2522
> You can use your own cache provider inheriting from System.Runtime.Caching.ObjectCache
2623
2724
## DefaultContext
28-
### Problem
29-
You want to change default configuration for all evaluations context.
25+
Gets or sets the default context to use for all operations using the default context.
3026

31-
### Solution
32-
Change default EvalContext configuration to
33-
- [Register & Unregister](https://github.com/zzzprojects/Eval-Expression.NET/wiki/EvalContext-Register-&-Unregister)
34-
- [Change Options](https://github.com/zzzprojects/Eval-Expression.NET/wiki/EvalContext-Options)
27+
You can also directly change options
28+
- [Register & Unregister](register-unregister)
29+
- [Options](options)
3530

3631
The default context is used in static methods:
37-
- [Eval.Execute](https://github.com/zzzprojects/Eval-Expression.NET/wiki/Eval-Execute)
38-
- [Eval.Compile](https://github.com/zzzprojects/Eval-Expression.NET/wiki/Eval-Compile)
39-
- ["string".Execute](https://github.com/zzzprojects/Eval-Expression.NET/wiki/Extension-Methods)
40-
- ["string".Compile](https://github.com/zzzprojects/Eval-Expression.NET/wiki/Extension-Methods)
41-
- [Dynamic LINQ](https://github.com/zzzprojects/Eval-Expression.NET/wiki/LINQ-Dynamic)
32+
- [Eval.Execute](eval-execute)
33+
- [Eval.Compile](eval-compile)
34+
- [LINQ Dynamic](linq-dynamic)
35+
- [string".Execute](string-extensions#stringexecute)
36+
- [string".Compile](string-extensions#stringcompile)
4237

4338
### Example
44-
```csharp
39+
{% highlight csharp %}
4540
// using Z.Expressions; // Don't forget to include this.
4641
EvalManager.DefaultContext.RegisterExtensionMethod(typeof(Z.ExtensionMethods))
4742

4843
// Make member case insensitive (Math.pOW = Math.Pow)
4944
EvalManager.DefaultContext.BindingFlags = BindingFlags.IgnoreCase | context.BindingFlags
50-
```
45+
{% endhighlight %}
5146

5247

0 commit comments

Comments
 (0)