private T GetSingleAttributeOrDefault <T>(FieldInfo fieldInfo) where T : Attribute, new()
        {
            Type      attributeType = typeof(T);
            Attribute attribute;
            var       key = new PointerPair(fieldInfo.FieldHandle.Value, attributeType.TypeHandle.Value);

            if (!_attributeCache.TryGetValue(key, out attribute))
            {
                _attributeCache.Add(key, attribute = base.GetSingleAttributeOrDefault <T>(fieldInfo));
            }
            return(attribute as T);
        }
        private T GetSingleAttributeOrDefault <T>(PropertyInfo propertyInfo) where T : Attribute, new()
        {
            Type      attributeType = typeof(T);
            Attribute attribute;
            var       key = new PointerPair(propertyInfo.GetGetMethod().MethodHandle.Value, attributeType.TypeHandle.Value);

            if (!_attributeCache.TryGetValue(key, out attribute))
            {
                _attributeCache.Add(key, attribute = base.GetSingleAttributeOrDefault <T>(propertyInfo));
            }
            return(attribute as T);
        }