35 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Collections.Generic;
 | |
| using System.Globalization;
 | |
| using System.Threading.Tasks;
 | |
| using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
 | |
| using Volo.Abp.Localization;
 | |
| using Volo.Abp.OpenIddict.Applications;
 | |
| 
 | |
| namespace KonSoft.Pages;
 | |
| 
 | |
| public class IndexModel : AbpPageModel
 | |
| {
 | |
|     public IndexModel(IOpenIddictApplicationRepository openIdApplicationRepository, ILanguageProvider languageProvider)
 | |
|     {
 | |
|         OpenIdApplicationRepository = openIdApplicationRepository;
 | |
|         LanguageProvider = languageProvider;
 | |
|     }
 | |
| 
 | |
|     public List<OpenIddictApplication>? Applications { get; protected set; }
 | |
| 
 | |
|     public IReadOnlyList<LanguageInfo>? Languages { get; protected set; }
 | |
| 
 | |
|     public string? CurrentLanguage { get; protected set; }
 | |
| 
 | |
|     protected IOpenIddictApplicationRepository OpenIdApplicationRepository { get; }
 | |
| 
 | |
|     protected ILanguageProvider LanguageProvider { get; }
 | |
| 
 | |
|     public async Task OnGetAsync()
 | |
|     {
 | |
|         Applications = await OpenIdApplicationRepository.GetListAsync();
 | |
| 
 | |
|         Languages = await LanguageProvider.GetLanguagesAsync();
 | |
|         CurrentLanguage = CultureInfo.CurrentCulture.DisplayName;
 | |
|     }
 | |
| } |