mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Data model debugger - Added module filtering
Data model debugger - Added search input (disabled & not yet implemented) Data model debugger - Finished list support
This commit is contained in:
1 parent
58e07ae5bd
commit
8e01d1f63e
10 files changed
+198
-47
No files matched your search
@@ -64,6 +64,15 @@ namespace Artemis.Core.Services
|
||||
}
|
||||
}
|
||||
|
||||
public DataModel GetPluginDataModel(Plugin plugin)
|
||||
{
|
||||
if (plugin is Module module)
|
||||
return module.InternalDataModel;
|
||||
if (plugin is BaseDataModelExpansion dataModelExpansion)
|
||||
return dataModelExpansion.InternalDataModel;
|
||||
return null;
|
||||
}
|
||||
|
||||
private void PluginServiceOnPluginEnabled(object sender, PluginEventArgs e)
|
||||
{
|
||||
if (e.PluginInfo.Instance is Module module && module.InternalExpandsMainDataModel)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using Artemis.Core.Models;
|
||||
using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.Core.Plugins.Abstract.DataModels;
|
||||
|
||||
namespace Artemis.Core.Services.Interfaces
|
||||
@@ -19,5 +20,11 @@ namespace Artemis.Core.Services.Interfaces
|
||||
/// </summary>
|
||||
/// <param name="baseDataModelExpansion"></param>
|
||||
void RemoveExpansion(DataModel baseDataModelExpansion);
|
||||
|
||||
/// <summary>
|
||||
/// If found, returns the data model of the provided plugin
|
||||
/// </summary>
|
||||
/// <param name="plugin">Should be a module with a data model or a data model expansion</param>
|
||||
DataModel GetPluginDataModel(Plugin plugin);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user