Skip to content

Commit

Permalink
Move the docs to the interface
Browse files Browse the repository at this point in the history
  • Loading branch information
infofromca committed Oct 4, 2024
1 parent 511dc12 commit 7a51f44
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,7 @@ ILogger<AutoSetupService> logger
_setupService = setupService;
_logger = logger;
}

/// <summary>
/// Sets up a tenant.
/// </summary>
/// <param name="setupOptions">The tenant setup options.</param>
/// <param name="shellSettings">The tenant shell settings.</param>
/// <returns>
/// Returns <c>true</c> if successfully setup.
/// </returns>

public async Task<bool> SetupTenantAsync(TenantSetupOptions setupOptions, ShellSettings shellSettings)
{
var setupContext = await GetSetupContextAsync(setupOptions, shellSettings);
Expand All @@ -59,12 +51,7 @@ public async Task<bool> SetupTenantAsync(TenantSetupOptions setupOptions, ShellS

return false;
}

/// <summary>
/// Creates a tenant shell settings.
/// </summary>
/// <param name="setupOptions">The setup options.</param>
/// <returns>The <see cref="ShellSettings"/>.</returns>

public async Task<ShellSettings> CreateTenantSettingsAsync(TenantSetupOptions setupOptions)
{
using var shellSettings = _shellSettingsManager
Expand All @@ -87,13 +74,7 @@ public async Task<ShellSettings> CreateTenantSettingsAsync(TenantSetupOptions se

return shellSettings;
}

/// <summary>
/// Gets a setup context from the configuration.
/// </summary>
/// <param name="options">The tenant setup options.</param>
/// <param name="shellSettings">The tenant shell settings.</param>
/// <returns> The <see cref="SetupContext"/> used to setup the site.</returns>

public async Task<SetupContext> GetSetupContextAsync(TenantSetupOptions options, ShellSettings shellSettings)
{
var recipes = await _setupService.GetSetupRecipesAsync();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
using OrchardCore.AutoSetup.Options;
using OrchardCore.AutoSetup.Options;
using OrchardCore.Environment.Shell;
using OrchardCore.Setup.Services;

namespace OrchardCore.AutoSetup.Services;

public interface IAutoSetupService
{
/// <summary>
/// Creates a tenant shell settings.
/// </summary>
/// <param name="setupOptions">The setup options.</param>
/// <returns>The <see cref="ShellSettings"/>.</returns>
Task<ShellSettings> CreateTenantSettingsAsync(TenantSetupOptions setupOptions);

/// <summary>
/// Gets a setup context from the configuration.
/// </summary>
/// <param name="options">The tenant setup options.</param>
/// <param name="shellSettings">The tenant shell settings.</param>
/// <returns> The <see cref="SetupContext"/> used to setup the site.</returns>
Task<SetupContext> GetSetupContextAsync(TenantSetupOptions options, ShellSettings shellSettings);

/// <summary>
/// Sets up a tenant.
/// </summary>
/// <param name="setupOptions">The tenant setup options.</param>
/// <param name="shellSettings">The tenant shell settings.</param>
/// <returns>
/// Returns <c>true</c> if successfully setup.
/// </returns>
Task<bool> SetupTenantAsync(TenantSetupOptions setupOptions, ShellSettings shellSettings);
}
}

0 comments on commit 7a51f44

Please sign in to comment.