overhaul provider structure

This commit is contained in:
2024-05-16 10:20:31 +02:00
parent 34bc418b88
commit b13f1ace7e
12 changed files with 61 additions and 68 deletions

View File

@@ -0,0 +1,17 @@
using Pilz.Plugins.Advanced;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OwnChar.Server.Data
{
public class ClientServerDataProvider() : PluginFunction(IServerDataProvider.FeatureCode, "ownchar.clientserver"), IServerDataProvider
{
protected override object? ExecuteFunction(PluginFunctionParameter? @params)
{
return this;
}
}
}

View File

@@ -1,4 +1,5 @@
using System;
using Pilz.Plugins.Advanced;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -8,5 +9,11 @@ namespace OwnChar.Server.Data
{
public interface IServerDataProvider
{
// Shared
public const string FeatureCode = "ownchar.server.dataprovider";
public IEnumerable<IServerDataProvider> DataProviders => PluginFeatureController.Instance.Features.Get(FeatureCode).Cast<PluginFunction>().Select(f => (IServerDataProvider)f.Execute()!);
// Interface
// ...
}
}