1 namespace System.Web.Mvc {
4 [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
5 public sealed class ChildActionOnlyAttribute : FilterAttribute, IAuthorizationFilter {
7 public void OnAuthorization(AuthorizationContext filterContext) {
8 if (filterContext == null) {
9 throw new ArgumentNullException("filterContext");
12 if (!filterContext.IsChildAction) {
13 throw Error.ChildActionOnlyAttribute_MustBeInChildRequest(filterContext.ActionDescriptor);