PropertyValueAttributeCache

A class that is being used to retrieve the cached attributes of the property.

A cacher class for retrieving mapped PropertyValueAttribute objects on a property. It uses PropertyValueAttributeMapper internally to extract mappings and caches them for future use.

Methods

Below are the methods available from this class.

Flush Allows you to flush the caches.
Get Returns the list of PropertyValueAttribute objects.

Usability

Call the Get() method by passing the class type and property name:

var attributes = PropertyValueAttributeCache.Get(typeof(Person), "Name");
// Use the 'attributes' here

Or via a property expression:

var attributes = PropertyValueAttributeCache.Get<Person>(e => e.Name);
// Use the 'attributes' here