GetOrAdd<T>(Func<ICompilation, T>)
Gets an item from the cache or computes it and add its.
Declaration
T GetOrAdd<T>(Func<ICompilation, T> func) where T : classParameters
| Type | Name | Description |
|---|---|---|
| Func<ICompilation, T> | func | The delegate that computes the item. The cache key is the MethodInfo of this delegate. It is essential that the implementation of this delegate is "static", i.e. has no reference to anything else than the ICompilation it is provided with. |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T | The kind of cached item. |