|  |  |  | @ -2,6 +2,7 @@ using System; | 
			
		
	
		
			
				
					|  |  |  |  | using System.Collections.Generic; | 
			
		
	
		
			
				
					|  |  |  |  | using System.Linq; | 
			
		
	
		
			
				
					|  |  |  |  | using System.Text; | 
			
		
	
		
			
				
					|  |  |  |  | using Microsoft.Extensions.Options; | 
			
		
	
		
			
				
					|  |  |  |  | using Volo.Abp.DependencyInjection; | 
			
		
	
		
			
				
					|  |  |  |  | using Volo.Abp.Http.Modeling; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -19,6 +20,13 @@ namespace Volo.Abp.Http.ProxyScripting.Generators.JQuery | 
			
		
	
		
			
				
					|  |  |  |  |         /// </summary> | 
			
		
	
		
			
				
					|  |  |  |  |         public const string Name = "jquery"; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         private readonly DynamicJavaScriptProxyOptions _dynamicJavaScriptProxyOptions; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         public JQueryProxyScriptGenerator(IOptions<DynamicJavaScriptProxyOptions> dynamicJavaScriptProxyOptions) | 
			
		
	
		
			
				
					|  |  |  |  |         { | 
			
		
	
		
			
				
					|  |  |  |  |             _dynamicJavaScriptProxyOptions = dynamicJavaScriptProxyOptions.Value; | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         public string CreateScript(ApplicationApiDescriptionModel model) | 
			
		
	
		
			
				
					|  |  |  |  |         { | 
			
		
	
		
			
				
					|  |  |  |  |             var script = new StringBuilder(); | 
			
		
	
	
		
			
				
					|  |  |  | @ -26,10 +34,16 @@ namespace Volo.Abp.Http.ProxyScripting.Generators.JQuery | 
			
		
	
		
			
				
					|  |  |  |  |             script.AppendLine("/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */"); | 
			
		
	
		
			
				
					|  |  |  |  |             script.AppendLine(); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             foreach (var module in model.Modules.Values) | 
			
		
	
		
			
				
					|  |  |  |  |             foreach (var module in model.Modules) | 
			
		
	
		
			
				
					|  |  |  |  |             { | 
			
		
	
		
			
				
					|  |  |  |  |                 if (!_dynamicJavaScriptProxyOptions.EnabledModules.Any(m => | 
			
		
	
		
			
				
					|  |  |  |  |                     module.Key.Equals(m, StringComparison.CurrentCultureIgnoreCase))) | 
			
		
	
		
			
				
					|  |  |  |  |                 { | 
			
		
	
		
			
				
					|  |  |  |  |                     continue; | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 script.AppendLine(); | 
			
		
	
		
			
				
					|  |  |  |  |                 AddModuleScript(script, module); | 
			
		
	
		
			
				
					|  |  |  |  |                 AddModuleScript(script, module.Value); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |             AddInitializedEventTrigger(script); | 
			
		
	
	
		
			
				
					|  |  |  | 
 |