public ControllerActionInvoker(Type controllerType) { Guard.ArgumentNotNull(controllerType, "controllerType"); _controllerType = controllerType; lock (_lock) { if (!_controllerDescriptorsCache.TryGetValue(controllerType, out _controllerDescriptor)) { _controllerDescriptor = new ReflectedControllerDescriptor(controllerType); _controllerDescriptorsCache.Add(controllerType, _controllerDescriptor); } } }
internal ReflectedActionDescriptor(MethodInfo methodInfo, string actionName, ControllerDescriptor controllerDescriptor, bool validateMethod) { Guard.ArgumentNotNull(methodInfo, "methodInfo"); Guard.ArgumentNotNullOrWhiteSpace(actionName, "actionName"); Guard.ArgumentNotNull(controllerDescriptor, "controllerDescriptor"); // check if (validateMethod) { VerifyActionMethodIsCallable(methodInfo); } _methodInfo = methodInfo; _actionName = actionName; _controllerDescriptor = controllerDescriptor; }
public ReflectedActionDescriptor(MethodInfo methodInfo, string actionName, ControllerDescriptor controllerDescriptor) : this(methodInfo, actionName, controllerDescriptor, true) { }