Link Search Menu Expand Document

PropertyCache


A hugely-used cacher class for the ClassProperty. It provides a 2nd-layer caching for the library when it comes to the class properties extraction.

Internally, this class is widely used within the library.

Methods

Below are the methods available from this class.

  • Flush - allows you to flush the caches.
  • Get - returns the list of ClassProperty objects.

Usability

You can simply call the Get() method of this class by passing the class type.

var properties = PropertyCache.Get(typeof(Person));
// Use the 'properties' here

Or, via generic type.

var properties = PropertyCache.Get<Person>();
// Use the 'properties' here

Internally, it uses the PropertyMapper and ClassExpression classes to extract and cache the list of ClassProperty objects.