Closed Xyolyp closed 3 years ago
Grapevine 5 offers two potential solutions. Both involve adding a BeforeStarting
event handler. In the handler you can either:
IRestServer.RouteScanner.ScanAssemblyContainingType<T>()
, and then register them using IRestServer.Router.Register(IEnumerable<IRoute> routes)
IRestServer.RouteScanner.AddIgnoredAssembly(string assemblyName)
Whichever way works best for your scenario.
In my project I work with thousands of assemblies and the scanning takes forever. I currently pervent it by registering a transparent route at "/" before starting the router. It would be nice if there was a build in way to prevent the scanning of assemlies in a way that doesn't require any unnecessary routes.