Ejemplo n.º 1
0
 internal static bool AreUrlParametersSupported(LogicalMethodInfo methodInfo)
 {
     if (methodInfo.OutParameters.Length > 0)
     {
         return(false);
     }
     ParameterInfo[] parameters = methodInfo.InParameters;
     for (int i = 0; i < parameters.Length; i++)
     {
         ParameterInfo parameter     = parameters[i];
         Type          parameterType = parameter.ParameterType;
         if (parameterType.IsArray)
         {
             if (!ScalarFormatter.IsTypeSupported(parameterType.GetElementType()))
             {
                 return(false);
             }
         }
         else
         {
             if (!ScalarFormatter.IsTypeSupported(parameterType))
             {
                 return(false);
             }
         }
     }
     return(true);
 }
Ejemplo n.º 2
0
        /// <include file='doc\ValueCollectionParameterReader.uex' path='docs/doc[@for="ValueCollectionParameterReader.IsSupported1"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        static public bool IsSupported(ParameterInfo paramInfo)
        {
            Type type = paramInfo.ParameterType;

            if (type.IsArray)
            {
                type = type.GetElementType();
            }
            return(ScalarFormatter.IsTypeSupported(type));
        }
 internal static bool AreUrlParametersSupported(LogicalMethodInfo methodInfo)
 {
     if (methodInfo.OutParameters.Length > 0)
     {
         return(false);
     }
     foreach (ParameterInfo info in methodInfo.InParameters)
     {
         Type parameterType = info.ParameterType;
         if (parameterType.IsArray)
         {
             if (!ScalarFormatter.IsTypeSupported(parameterType.GetElementType()))
             {
                 return(false);
             }
         }
         else if (!ScalarFormatter.IsTypeSupported(parameterType))
         {
             return(false);
         }
     }
     return(true);
 }