/// <summary>
 /// Applies method parameter attributes to a parameter builder.
 /// </summary>
 /// <param name="parmBuilder">A parameter builder.</param>
 /// <param name="methodParm">A method parameter attribute.</param>
 private void ApplyParameterAttributes(
     IParameterBuilder parmBuilder,
     ControllerMethodParameterAttribute methodParm)
 {
     if (methodParm.From == ControllerMethodParameterFromOption.Body)
     {
         parmBuilder.SetCustomAttribute(AttributeUtility.BuildAttribute <FromBodyAttribute>());
     }
     else if (methodParm.From == ControllerMethodParameterFromOption.Header)
     {
         parmBuilder.SetCustomAttribute(AttributeUtility.BuildAttribute <FromHeaderAttribute>(
                                            () =>
         {
             var prop = typeof(FromHeaderAttribute).GetProperty("Name");
             return(new[] { new Tuple <PropertyInfo, object>(prop, methodParm.FromName) });
         }));
     }
     else if (methodParm.From == ControllerMethodParameterFromOption.Query)
     {
         parmBuilder.SetCustomAttribute(AttributeUtility.BuildAttribute <FromQueryAttribute>(
                                            () =>
         {
             var prop = typeof(FromQueryAttribute).GetProperty("Name");
             return(new[] { new Tuple <PropertyInfo, object>(prop, methodParm.FromName) });
         }));
     }
     else if (methodParm.From == ControllerMethodParameterFromOption.Route)
     {
         parmBuilder.SetCustomAttribute(AttributeUtility.BuildAttribute <FromRouteAttribute>(
                                            () =>
         {
             var prop = typeof(FromQueryAttribute).GetProperty("Name");
             return(new[] { new Tuple <PropertyInfo, object>(prop, methodParm.FromName) });
         }));
     }
 }