Link Search Menu Expand Document

PropertyValueAttributeCache


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.

FlushAllows you to flush the caches.
GetReturns 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