Merge branch 'master' into master
This commit is contained in:
		
							
								
								
									
										10
									
								
								Oqtane.Client/Services/Interfaces/ISystemService.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Oqtane.Client/Services/Interfaces/ISystemService.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | ||||
| using System.Collections.Generic; | ||||
| using System.Threading.Tasks; | ||||
|  | ||||
| namespace Oqtane.Services | ||||
| { | ||||
|     public interface ISystemService | ||||
|     { | ||||
|         Task<Dictionary<string, string>> GetSystemInfoAsync(); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										32
									
								
								Oqtane.Client/Services/SystemService.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								Oqtane.Client/Services/SystemService.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,32 @@ | ||||
| using System.Net.Http; | ||||
| using System.Threading.Tasks; | ||||
| using Microsoft.AspNetCore.Components; | ||||
| using Oqtane.Shared; | ||||
| using System.Collections.Generic; | ||||
|  | ||||
| namespace Oqtane.Services | ||||
| { | ||||
|     public class SystemService : ServiceBase, ISystemService | ||||
|     { | ||||
|          | ||||
|         private readonly SiteState _siteState; | ||||
|         private readonly NavigationManager _navigationManager; | ||||
|  | ||||
|         public SystemService(HttpClient http, SiteState siteState, NavigationManager navigationManager) : base(http) | ||||
|         { | ||||
|              | ||||
|             _siteState = siteState; | ||||
|             _navigationManager = navigationManager; | ||||
|         } | ||||
|  | ||||
|         private string Apiurl | ||||
|         { | ||||
|             get { return CreateApiUrl(_siteState.Alias, _navigationManager.Uri, "System"); } | ||||
|         } | ||||
|  | ||||
|         public async Task<Dictionary<string, string>> GetSystemInfoAsync() | ||||
|         { | ||||
|             return await GetJsonAsync<Dictionary<string, string>>(Apiurl); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Shaun Walker
					Shaun Walker