Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. public static IRouter CreateAttributeMegaRoute(IServiceProvider services)
  2. {
  3. if (services == null)
  4. {
  5. throw new ArgumentNullException(nameof(services));
  6. }
  7.  
  8. return new AttributeRoute(
  9. services.GetRequiredService<IActionDescriptorCollectionProvider>(),
  10. services,
  11. actions =>
  12. {
  13. var handler = services.GetRequiredService<MvcAttributeRouteHandler>();
  14. handler.Actions = actions;
  15. return handler;
  16. });
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement