mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-03-25 02:38:48 +00:00
Storage - Added LiteDB to SQLite migration UI - Try to die a bit more gracefully Core - Delay start watching plugins for hot reload after initializing UI - Simplify category management logic UI - Avoid crash during profile icon load Storage - Fix entry metadata retrieval
45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
namespace Artemis.Storage.Legacy.Entities.Plugins;
|
|
|
|
/// <summary>
|
|
/// Represents the configuration of a plugin, each plugin has one configuration
|
|
/// </summary>
|
|
internal class PluginEntity
|
|
{
|
|
public PluginEntity()
|
|
{
|
|
Features = new List<PluginFeatureEntity>();
|
|
}
|
|
|
|
public Guid Id { get; set; }
|
|
public bool IsEnabled { get; set; }
|
|
|
|
public List<PluginFeatureEntity> Features { get; set; }
|
|
|
|
public Artemis.Storage.Entities.Plugins.PluginEntity Migrate()
|
|
{
|
|
return new Artemis.Storage.Entities.Plugins.PluginEntity()
|
|
{
|
|
PluginGuid = Id,
|
|
IsEnabled = IsEnabled,
|
|
Features = Features.Select(f => f.Migrate()).ToList()
|
|
};
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Represents the configuration of a plugin feature, each feature has one configuration
|
|
/// </summary>
|
|
internal class PluginFeatureEntity
|
|
{
|
|
public string Type { get; set; } = string.Empty;
|
|
public bool IsEnabled { get; set; }
|
|
|
|
public Artemis.Storage.Entities.Plugins.PluginFeatureEntity Migrate()
|
|
{
|
|
return new Artemis.Storage.Entities.Plugins.PluginFeatureEntity()
|
|
{
|
|
Type = Type,
|
|
IsEnabled = IsEnabled
|
|
};
|
|
}
|
|
} |