mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Core - Added stores for the different register-able types
Profiles - Refactored large parts of the profile structure to use these stores
This commit is contained in:
1 parent
1e52bc5b31
commit
86ff4497f3
75 files changed
+1526
-934
No files matched your search
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Artemis.Core.DataModelExpansions;
|
||||
|
||||
namespace Artemis.Core.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// A service that allows you to register and retrieve data models
|
||||
/// </summary>
|
||||
public interface IDataModelService : IArtemisService
|
||||
{
|
||||
/// <summary>
|
||||
/// Add a data model to so that it is available to conditions and data bindings
|
||||
/// </summary>
|
||||
/// <param name="dataModel"></param>
|
||||
DataModelRegistration RegisterDataModel(DataModel dataModel);
|
||||
|
||||
/// <summary>
|
||||
/// Remove a previously added data model so that it is no longer available
|
||||
/// </summary>
|
||||
void RemoveDataModel(DataModelRegistration registration);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of all registered data models
|
||||
/// </summary>
|
||||
List<DataModel> GetDataModels();
|
||||
|
||||
/// <summary>
|
||||
/// If found, returns the registered data model of type <typeparamref name="T" />
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the data model to find</typeparam>
|
||||
T GetDataModel<T>() where T : DataModel;
|
||||
|
||||
/// <summary>
|
||||
/// If found, returns the data model of the provided plugin
|
||||
/// </summary>
|
||||
/// <param name="plugin">The plugin to find the data model of</param>
|
||||
DataModel GetPluginDataModel(Plugin plugin);
|
||||
|
||||
/// <summary>
|
||||
/// If found, returns the data model of the provided plugin GUID
|
||||
/// </summary>
|
||||
/// <param name="pluginGuid">The GUID of the plugin to find the data model of</param>
|
||||
DataModel GetPluginDataModel(Guid pluginGuid);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user