Ejemplo n.º 1
0
        /// <summary>
        /// Initializes the property and generates the implementation for getter and setter methods.
        /// </summary>
        public FastPropertyInfo(PropertyInfo property)
        {
            this.property = property;

            if (property.CanWrite)
            {
                setValueImpl = DynamicMethodCompiler.CreateSetHandler(property.DeclaringType, property);
            }

            if (property.CanRead)
            {
                getValueImpl = DynamicMethodCompiler.CreateGetHandler(property.DeclaringType, property);
            }
        }