Попробуйте:
Контроллер
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
foreach (var filter in filterContext.ActionDescriptor.GetCustomAttributes(typeof (MyAttribute), false).Cast<MyAttribute>())
{
var desiredValue = filter.Parameter;
}
base.OnActionExecuting(filterContext);
}
Фильтр
public class MyAttribute : FilterAttribute, IActionFilter
{
private readonly int _parameter;
public MyAttribute(int parameter)
{
_parameter = parameter;
}
public int Parameter { get { return _parameter; } }
public void OnActionExecuted(ActionExecutedContext filterContext)
{
//throw new NotImplementedException();
}
public void OnActionExecuting(ActionExecutingContext filterContext)
{
//throw new NotImplementedException();
}
}