public void ScanAssemblies() { if ((ServiceAssemblies == null) || (ServiceAssemblies.Count == 0)) { return; } foreach (var assembly in ServiceAssemblies) { RouteScanner scanner = new RouteScanner(assembly); Dictionary <string, Route> currentRouteDictionary = scanner.Scan(); ServiceRouteProvider.MergeRoutes(currentRouteDictionary); } }
/// <summary> /// The scan assemblies. /// </summary> public void ScanAssemblies() { if ((this.ServiceAssemblies == null) || (this.ServiceAssemblies.Count == 0)) { return; } foreach (var assembly in this.ServiceAssemblies) { var scanner = new RouteScanner(assembly); var currentRouteDictionary = scanner.Scan(); ServiceRouteProvider.MergeRoutes(currentRouteDictionary); } }
/// <summary> /// The scan assemblies. /// </summary> public void ScanAssemblies() { if ((this.HostConfig?.ServiceAssemblies == null) || (this.HostConfig?.ServiceAssemblies.Count == 0)) { return; } foreach (var assembly in this.HostConfig?.ServiceAssemblies) { if (!assembly.IsScanned) { RouteScanner scanner = new RouteScanner(assembly.Assembly); Dictionary <string, Route> currentRouteDictionary = scanner.Scan(); ServiceRouteProvider.MergeRoutes(currentRouteDictionary); assembly.IsScanned = true; } } }
/// <summary> /// The scan assemblies. /// </summary> public void ScanAssemblies() { if ((HostConfig?.ServiceAssemblies == null) || (HostConfig?.ServiceAssemblies.Count == 0)) { return; } foreach (var assembly in HostConfig?.ServiceAssemblies) { if (!assembly.IsScanned) { var scanner = new RouteScanner(assembly.Assembly); var currentRouteDictionary = scanner.Scan().Item1; var currentCommandDictionary = scanner.Scan().Item2; ServiceRouteProvider.MergeRoutes(currentRouteDictionary); ServiceRouteProvider.MergeCommands(currentCommandDictionary); assembly.IsScanned = true; } } }