2022-11-27 20:43:21 +00:00
|
|
|
namespace VpSharp.Commands;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines configuration for <see cref="CommandsExtensionConfiguration" />.
|
|
|
|
/// </summary>
|
|
|
|
public sealed class CommandsExtensionConfiguration
|
|
|
|
{
|
2022-11-30 20:54:22 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="CommandsExtensionConfiguration" /> class.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="configuration">The configuration to copy.</param>
|
|
|
|
public CommandsExtensionConfiguration(CommandsExtensionConfiguration? configuration = null)
|
|
|
|
{
|
|
|
|
if (configuration is null)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
Prefixes = configuration.Prefixes;
|
|
|
|
Services = configuration.Services;
|
|
|
|
}
|
|
|
|
|
2022-11-27 20:43:21 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the prefixes to be use for commands.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The command prefixes, as an array of <see cref="string" /> values.</value>
|
2022-11-30 18:03:00 +00:00
|
|
|
public IReadOnlyList<string> Prefixes { get; set; } = Array.Empty<string>();
|
2022-11-30 20:54:22 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the service provider.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The service provider.</value>
|
|
|
|
public IServiceProvider? Services { get; set; }
|
2022-11-27 20:43:21 +00:00
|
|
|
}
|