Tell all concrete implementations to be private / not show in the docs

This commit is contained in:
ijungleboy 2021-05-21 18:29:06 +02:00
parent 074b998bbc
commit de6acf0029
28 changed files with 66 additions and 0 deletions

View File

@ -5,15 +5,21 @@ using System.Linq;
using System.Collections.Generic;
using System.Net;
using System;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
/// <inheritdoc cref="IAliasService" />
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class AliasService : ServiceBase, IAliasService
{
private readonly SiteState _siteState;
/// <summary>
/// Constructor - should only be used by Dependency Injection
/// </summary>
public AliasService(HttpClient http, SiteState siteState) : base(http)
{
_siteState = siteState;
@ -21,32 +27,38 @@ namespace Oqtane.Services
private string ApiUrl => CreateApiUrl("Alias", _siteState.Alias);
/// <inheritdoc />
public async Task<List<Alias>> GetAliasesAsync()
{
List<Alias> aliases = await GetJsonAsync<List<Alias>>(ApiUrl);
return aliases.OrderBy(item => item.Name).ToList();
}
/// <inheritdoc />
public async Task<Alias> GetAliasAsync(int aliasId)
{
return await GetJsonAsync<Alias>($"{ApiUrl}/{aliasId}");
}
/// <inheritdoc />
public async Task<Alias> GetAliasAsync(string path, DateTime lastSyncDate)
{
// tenant agnostic as SiteState does not exist
return await GetJsonAsync<Alias>($"{CreateApiUrl("Alias", null)}/name/?path={WebUtility.UrlEncode(path)}&sync={lastSyncDate.ToString("yyyyMMddHHmmssfff")}");
}
/// <inheritdoc />
public async Task<Alias> AddAliasAsync(Alias alias)
{
return await PostJsonAsync<Alias>(ApiUrl, alias);
}
/// <inheritdoc />
public async Task<Alias> UpdateAliasAsync(Alias alias)
{
return await PutJsonAsync<Alias>($"{ApiUrl}/{alias.AliasId}", alias);
}
/// <inheritdoc />
public async Task DeleteAliasAsync(int aliasId)
{
await DeleteAsync($"{ApiUrl}/{aliasId}");

View File

@ -3,10 +3,12 @@ using System.Threading.Tasks;
using System.Net.Http;
using System.Linq;
using System.Collections.Generic;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class DatabaseService : ServiceBase, IDatabaseService
{

View File

@ -4,12 +4,14 @@ using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.JSInterop;
using Oqtane.Documentation;
using Oqtane.Models;
using Oqtane.Shared;
using Oqtane.UI;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class FileService : ServiceBase, IFileService
{
private readonly SiteState _siteState;

View File

@ -7,9 +7,11 @@ using Oqtane.Shared;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Net;
using Oqtane.Documentation;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class FolderService : ServiceBase, IFolderService
{
private readonly SiteState _siteState;

View File

@ -1,10 +1,12 @@
using Oqtane.Models;
using System.Threading.Tasks;
using System.Net.Http;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class InstallationService : ServiceBase, IInstallationService
{
private readonly SiteState _siteState;

View File

@ -3,10 +3,12 @@ using System.Threading.Tasks;
using System.Net.Http;
using System.Linq;
using System.Collections.Generic;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class JobLogService : ServiceBase, IJobLogService
{
private readonly SiteState _siteState;

View File

@ -3,10 +3,12 @@ using System.Threading.Tasks;
using System.Net.Http;
using System.Linq;
using System.Collections.Generic;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class JobService : ServiceBase, IJobService
{
private readonly SiteState _siteState;

View File

@ -2,11 +2,13 @@ using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Oqtane.Documentation;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class LanguageService : ServiceBase, ILanguageService
{

View File

@ -1,11 +1,13 @@
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using Oqtane.Documentation;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class LocalizationService : ServiceBase, ILocalizationService
{
private readonly SiteState _siteState;

View File

@ -4,12 +4,14 @@ using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Oqtane.Documentation;
using Oqtane.Enums;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class LogService : ServiceBase, ILogService
{

View File

@ -5,11 +5,13 @@ using System.Net.Http;
using System.Threading.Tasks;
using System;
using System.Reflection;
using Oqtane.Documentation;
using Oqtane.Shared;
using Oqtane.UI;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class ModuleDefinitionService : ServiceBase, IModuleDefinitionService
{
private readonly HttpClient _http;

View File

@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class ModuleService : ServiceBase, IModuleService
{

View File

@ -4,9 +4,11 @@ using System.Net.Http;
using Oqtane.Shared;
using System.Collections.Generic;
using System.Linq;
using Oqtane.Documentation;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class NotificationService : ServiceBase, INotificationService
{
private readonly SiteState _siteState;

View File

@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using System.Linq;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class PackageService : ServiceBase, IPackageService
{
private readonly SiteState _siteState;

View File

@ -1,10 +1,12 @@
using Oqtane.Models;
using System.Net.Http;
using System.Threading.Tasks;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class PageModuleService : ServiceBase, IPageModuleService
{

View File

@ -6,9 +6,11 @@ using System.Collections.Generic;
using Oqtane.Shared;
using System;
using System.Net;
using Oqtane.Documentation;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class PageService : ServiceBase, IPageService
{

View File

@ -3,10 +3,12 @@ using System.Threading.Tasks;
using System.Net.Http;
using System.Linq;
using System.Collections.Generic;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class ProfileService : ServiceBase, IProfileService
{

View File

@ -3,10 +3,12 @@ using System.Threading.Tasks;
using System.Net.Http;
using System.Linq;
using System.Collections.Generic;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class RoleService : ServiceBase, IRoleService
{

View File

@ -4,11 +4,13 @@ using System.Net.Http;
using System.Net.Http.Json;
using System.Threading;
using System.Threading.Tasks;
using Oqtane.Documentation;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class ServiceBase
{
private readonly HttpClient _http;

View File

@ -4,10 +4,12 @@ using System.Threading.Tasks;
using System.Net.Http;
using System.Linq;
using System.Collections.Generic;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class SettingService : ServiceBase, ISettingService
{

View File

@ -5,9 +5,11 @@ using System.Linq;
using System.Collections.Generic;
using Oqtane.Shared;
using System;
using Oqtane.Documentation;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class SiteService : ServiceBase, ISiteService
{

View File

@ -4,9 +4,11 @@ using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Oqtane.Documentation;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class SiteTemplateService : ServiceBase, ISiteTemplateService
{
private readonly SiteState _siteState;

View File

@ -2,9 +2,11 @@ using Oqtane.Models;
using Oqtane.Shared;
using System.Net.Http;
using System.Threading.Tasks;
using Oqtane.Documentation;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class SqlService : ServiceBase, ISqlService
{
private readonly SiteState _siteState;

View File

@ -1,10 +1,12 @@
using System.Net.Http;
using System.Threading.Tasks;
using System.Collections.Generic;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class SystemService : ServiceBase, ISystemService
{
private readonly SiteState _siteState;

View File

@ -3,10 +3,12 @@ using System.Net.Http;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class TenantService : ServiceBase, ITenantService
{
private readonly SiteState _siteState;

View File

@ -2,11 +2,13 @@ using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Oqtane.Documentation;
using Oqtane.Models;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class ThemeService : ServiceBase, IThemeService
{
private readonly SiteState _siteState;

View File

@ -2,10 +2,12 @@ using Oqtane.Models;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using Oqtane.Documentation;
using Oqtane.Shared;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class UserRoleService : ServiceBase, IUserRoleService
{

View File

@ -2,9 +2,11 @@ using Oqtane.Shared;
using Oqtane.Models;
using System.Net.Http;
using System.Threading.Tasks;
using Oqtane.Documentation;
namespace Oqtane.Services
{
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
public class UserService : ServiceBase, IUserService
{
private readonly SiteState _siteState;