Ejemplo n.º 1
0
 /// <summary>
 /// Gets the mapped property handler object for the current property.
 /// </summary>
 /// <typeparam name="TPropertyHandler">The type of the handler.</typeparam>
 /// <returns>The mapped property handler object.</returns>
 public TPropertyHandler GetPropertyHandler <TPropertyHandler>()
 {
     if (propertyHandlerWasSet == true)
     {
         return(Converter.ToType <TPropertyHandler>(propertyHandler));
     }
     propertyHandlerWasSet = true;
     propertyHandler       = PropertyHandlerCache.Get <TPropertyHandler>(GetDeclaringType(), PropertyInfo);
     return(Converter.ToType <TPropertyHandler>(propertyHandler));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the mapped property handler object for the current property.
        /// </summary>
        /// <typeparam name="TPropertyHandler">The type of the handler.</typeparam>
        /// <returns>The mapped property handler object.</returns>
        public TPropertyHandler GetPropertyHandler <TPropertyHandler>()
        {
            if (m_propertyHandlerWasSet == true)
            {
                return(Converter.ToType <TPropertyHandler>(m_propertyHandler));
            }

            // Set the flag
            m_propertyHandlerWasSet = true;

            // Set the instance
            m_propertyHandler = PropertyHandlerCache.Get <TPropertyHandler>(GetDeclaringType(), PropertyInfo);

            // Return the value
            return(Converter.ToType <TPropertyHandler>(m_propertyHandler));
        }