The FilterAliasAttribute constructor whether the alias parameter IsNullOrEmpty and if it is, throws an ArgumentNullException. However, it is throwing the ArgumentNullException with the value of the alias parameter (which would always be null or empty) rather than the nameof the alias parameter as the ArgumentNullException expects. So, it seems like the constructor should be this:
public FilterAliasAttribute(string alias)
{
if (string.IsNullOrEmpty(alias))
{
throw new ArgumentNullException(nameof(alias));
}
Alias = alias;
}
Rather than this:
public FilterAliasAttribute(string alias)
{
if (string.IsNullOrEmpty(alias))
{
throw new ArgumentNullException(alias);
}
Alias = alias;
}