/// <summary> /// Scans the type T and returns a list of discovered routes /// </summary> /// <param name="scanner"></param> /// <param name="basePath"></param> /// <typeparam name="T"></typeparam> /// <returns></returns> public static IList <IRoute> Scan <T>(this IRouteScanner scanner, string basePath = null) { return(scanner.Scan(typeof(T), basePath)); }
/// <summary> /// Scans the assembly containing the specified type and returns a list of discovered routes /// </summary> /// <param name="scanner"></param> /// <param name="services"></param> /// <param name="basePath"></param> /// <typeparam name="T"></typeparam> /// <returns></returns> public static IList <IRoute> ScanAssemblyContainingType <T>(this IRouteScanner scanner, IServiceCollection services = null, string basePath = null) { Assembly assembly = Assembly.GetAssembly(typeof(T)); return(scanner.Scan(assembly, basePath)); }