这是我的操作代码筛选属性“ Actions”类型为我的模型类型。
System.out.println("please enter day :");
String a1 = input.nextLine();
while (!dayArray.contains(a1)){
System.out.println("invalid day , please enter another day : ");
a1 = input.nextLine();
}
System.out.println("please enter time : ");
String a2 = input.nextLine();
while (!timeArray.contains(a2)){
System.out.println("invalid time , please enter another time : ");
a2 = input.nextLine();
}
如果我通过像这样的模型public class LockProvisionPeriod : ActionFilterAttribute
{
public UserInfo Actions { get; set; }
public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
{
var name = Actions;
base.OnActionExecuted(actionExecutedContext);
}
}
其抛出[LockProvisionPeriod(Actions=UserInfo )]
。
有什么方法可以在actionExecuted或actionExecuting过滤器中传递模型对象?