/// <inheritdoc cref="ITypePropertyProvider.GetProperties"/>
        /// <remarks>
        /// Returns the properties of the type from the cache, if they are there,
        /// otherwise delegates the call to the decorated provider,
        /// then writes to the cache and returns the result.
        /// </remarks>
        public IEnumerable <PropertyInfo> GetProperties(object source)
        {
            var key = objectCache.GetKey(source);

            var result = objectCache.GetOrAdd(key, () => decorated.GetProperties(source));

            return(result as IEnumerable <PropertyInfo>);
        }
 /// <inheritdoc cref="IPropertyProvider.GetProperties"/>
 public IEnumerable <IPropertyAccessor> GetProperties(object source)
 {
     return(typePropertyProvider
            .GetProperties(source)
            .Select(property => propertyAccessorFactory.Create(property)));
 }