Exemplo n.º 1
0
        /// <summary>
        /// Returns the value of the parameter with the given expression.
        /// </summary>
        /// <param name="event">the event to extend</param>
        /// <param name="pathExpression">the path/name of the property</param>
        /// <returns>The value for the parameter</returns>
        public static TValue getParameterFor <TParameter, TValue>(this [email protected] <TParameter> @event, Expression <Func <TParameter, TValue> > pathExpression)
        {
            string sPropertyName = ExpressionEvaluator.GetPath(pathExpression);

            return(@event.getParameter <TValue>(sPropertyName));
        }