title: Nothing happened with custom IRouter in Asp.Net Core
body: <p>I have the following implementation of my router:</p>
  
  <pre><code>public class TenantUrlResolverRouter : IRouter
  {
      private readonly IRouter _defaultRouter;
  
      public TenantUrlResolverRouter(IRouter defaultRouter)
      {
          _defaultRouter = defaultRouter;
      }
  
      public VirtualPathData GetVirtualPath(VirtualPathContext context)
      {
          return _defaultRouter.GetVirtualPath(context);
      }
  
      public async Task RouteAsync(RouteContext context)
      {
          var oldRouteData = context.RouteData;
          var newRouteData = new RouteData(oldRouteData);
          newRouteData.Values["library"] = "Default";
          try
          {
              context.RouteData = newRouteData;
              await _defaultRouter.RouteAsync(context);
          }
          finally
          {
              if (!context.IsHandled)
              {
                  context.RouteData = oldRouteData;
              }
          }
      }
  }
  </code></pre>
  
  <p>Then I define it in <code>Startup.cs</code>:</p>
  
  <pre><code>app.UseMvc(routes =&gt;
          {
              routes.Routes.Add(
                  new TenantUrlResolverRouter(routes.DefaultHandler));
              routes.MapRoute(
                  name: "default",
                  template: "{library=Unknown}/{controller=Home}/{action=Index}/{id?}");
          });
  </code></pre>
  
  <p>But nothing happens, <code>RouteData.Values</code> in <code>RouteContext</code> always empty, I always have <em>Unknown</em>, while it's need to be <em>Default</em>. That's not the problem of the predefined template, because it even worked without the <code>{library=Unknown}</code> and this <code>{library}/{controller=Home}/{action=Index}/{id?}</code> doesn't work too.</p>
  
  <p>What's the problem with this custom IRouter?</p>