#region ========================================================================= USING ===================================================================================== using Lumina.Plugins.Contracts.Common.Models.DTO.Settings; using Lumina.Plugins.Contracts.Core.Plugins; using Microsoft.Extensions.DependencyInjection; using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; #endregion namespace Lumina.TestPlugin; /// /// Test plugin used to verify the plugin loading pipeline of the host application. /// [ExcludeFromCodeCoverage] public sealed class TestPlugin : IPlugin, IPluginServiceRegistrator { public const string REGISTERED_MARKER = "plugin-services-registered"; /// /// Gets the stable unique identifier of the plugin. /// public static Guid PluginId { get; } = Guid.Parse("7B5A3E5D-9B7F-4A1E-8D9C-2F3A4B5C6D7E"); /// /// Gets the display name of the plugin. /// public static string PluginName { get; } = "Test Plugin"; /// /// Gets the stable unique identifier of the plugin, used to persist its state. /// public Guid Id => PluginId; /// /// Gets the display name of the plugin. /// public string Name => PluginName; /// /// Gets the author of the plugin. /// public string Author => "Test Author"; /// /// Gets the version of the plugin. /// public Version Version => new(1, 0, 0); /// /// Gets the description of the plugin. /// public string Description => "A test plugin used to verify the plugin loading pipeline."; /// /// Gets the settings schema of the plugin, used by the host to render the plugin settings page. /// /// The collection of setting descriptors declared by the plugin. public IReadOnlyList GetSettingsSchema() { return []; } /// /// Registers the services of the plugin into the host dependency injection container. /// /// The service collection to which the plugin services are added. public void RegisterServices(IServiceCollection services) { services.AddSingleton(REGISTERED_MARKER); } }