FieldCache
A cacher class for class properties represented as fields. It provides a second caching layer for property extraction.
Internally, this class is widely used within the library.
Methods
Below is the list of methods.
| Name | Description |
|---|---|
| Flush | Allows you to flush the caches. |
| Get | Returns the list of Field objects. |
Usability
Call the Get() method by passing the class type:
var fields = FieldCache.Get(typeof(Person));
// Use the 'fields' here
Or via generic type:
var fields = FieldCache.Get<Person>();
// Use the 'fields' here
Internally, it uses PropertyCache to extract ClassProperty objects and convert them to an
Enumerable<Field>.