title: Is it possible to use the same router in multiple middlewares?
body: <p>In Startup.cs I want to configure 2 middlewares:</p>
  
  <ol>
  <li>An app.Use (or app.Map with app.Use) which handles websocket requests, but requires a specific dynamic route endpoint.</li>
  <li>app.UseMvc() with attribute routing.</li>
  </ol>
  
  <p>How the router can be created and reused in MVC in such situation?</p>
  
  <p>PS. Here is my related question where I am looking at the same problem from a different perspective: <a href="https://stackoverflow.com/questions/35554128/opening-a-websocket-channel-inside-mvc-controller">Opening a websocket channel inside MVC controller</a></p>