/// <summary>
 /// Check if the parameter represents a list of parameters (<c>params</c> keyword in C#)
 /// </summary>
 /// <param name="self">The ParameterDefinition on which the extension method can be called.</param>
 /// <returns>True if the parameter represents a list of parameters, false otherwise.</returns>
 public static bool IsParams(this ParameterDefinition self)
 {
     return(self.HasAttribute("System", "ParamArrayAttribute"));
 }
Пример #2
0
        // Preconditions:

        public static bool HasAllowNullAttribute(this ParameterDefinition parameter)
        {
            return(parameter.HasAttribute("System.Diagnostics.CodeAnalysis.AllowNullAttribute"));
        }