private async Task <ActionDescriptor> InvokeActionSelector(RouteContext context) { var controllerTypeInfos = typeof(DefaultActionDiscoveryConventionsActionSelectionTests) .GetNestedTypes(BindingFlags.NonPublic) .Select(ct => ct.GetTypeInfo()) .ToArray(); var conventions = new StaticActionDiscoveryConventions(controllerTypeInfos); return(await InvokeActionSelector(context, conventions)); }
private ControllerActionDescriptorProvider GetActionDescriptorProvider( IActionDiscoveryConventions actionDiscoveryConventions = null) { var assemblyProvider = new StaticAssemblyProvider(); if (actionDiscoveryConventions == null) { var controllerTypes = typeof(ActionAttributeTests) .GetNestedTypes(BindingFlags.NonPublic) .Select(t => t.GetTypeInfo()); actionDiscoveryConventions = new StaticActionDiscoveryConventions(controllerTypes.ToArray()); } return(new ControllerActionDescriptorProvider( assemblyProvider, actionDiscoveryConventions, new TestGlobalFilterProvider(), new MockMvcOptionsAccessor())); }
private ReflectedActionDescriptorProvider GetActionDescriptorProvider( IActionDiscoveryConventions actionDiscoveryConventions = null) { var controllerAssemblyProvider = new StaticControllerAssemblyProvider(); if (actionDiscoveryConventions == null) { var controllerTypes = typeof(ActionAttributeTests) .GetNestedTypes(BindingFlags.NonPublic) .Select(t => t.GetTypeInfo()); actionDiscoveryConventions = new StaticActionDiscoveryConventions(controllerTypes.ToArray()); } return(new ReflectedActionDescriptorProvider( controllerAssemblyProvider, actionDiscoveryConventions, null, new MockMvcOptionsAccessor(), Mock.Of <IInlineConstraintResolver>())); }
private async Task<ActionDescriptor> InvokeActionSelector(RouteContext context) { var controllerTypeInfos = typeof(DefaultActionDiscoveryConventionsActionSelectionTests) .GetNestedTypes(BindingFlags.NonPublic) .Select(ct => ct.GetTypeInfo()) .ToArray(); var conventions = new StaticActionDiscoveryConventions(controllerTypeInfos); return await InvokeActionSelector(context, conventions); }
private ReflectedActionDescriptorProvider GetActionDescriptorProvider( IActionDiscoveryConventions actionDiscoveryConventions = null) { var controllerAssemblyProvider = new StaticControllerAssemblyProvider(); if (actionDiscoveryConventions == null) { var controllerTypes = typeof(ActionAttributeTests) .GetNestedTypes(BindingFlags.NonPublic) .Select(t => t.GetTypeInfo()); actionDiscoveryConventions = new StaticActionDiscoveryConventions(controllerTypes.ToArray()); } return new ReflectedActionDescriptorProvider( controllerAssemblyProvider, actionDiscoveryConventions, null, new MockMvcOptionsAccessor(), Mock.Of<IInlineConstraintResolver>()); }