2023-09-12 09:43:46 +00:00
|
|
|
|
using DistTestCore;
|
|
|
|
|
|
2023-09-11 09:59:33 +00:00
|
|
|
|
namespace CodexPlugin
|
|
|
|
|
{
|
|
|
|
|
public interface ICodexNodeFactory
|
|
|
|
|
{
|
2023-09-11 14:57:57 +00:00
|
|
|
|
OnlineCodexNode CreateOnlineCodexNode(CodexAccess access, CodexNodeGroup group);
|
2023-09-11 09:59:33 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class CodexNodeFactory : ICodexNodeFactory
|
|
|
|
|
{
|
2023-09-12 09:43:46 +00:00
|
|
|
|
private readonly IPluginTools tools;
|
|
|
|
|
|
|
|
|
|
public CodexNodeFactory(IPluginTools tools)
|
|
|
|
|
{
|
|
|
|
|
this.tools = tools;
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-11 09:59:33 +00:00
|
|
|
|
//private readonly TestLifecycle lifecycle;
|
|
|
|
|
//private readonly IMetricsAccessFactory metricsAccessFactory;
|
|
|
|
|
//private readonly IMarketplaceAccessFactory marketplaceAccessFactory;
|
|
|
|
|
|
|
|
|
|
//public CodexNodeFactory(TestLifecycle lifecycle, IMetricsAccessFactory metricsAccessFactory, IMarketplaceAccessFactory marketplaceAccessFactory)
|
|
|
|
|
//{
|
|
|
|
|
// this.lifecycle = lifecycle;
|
|
|
|
|
// this.metricsAccessFactory = metricsAccessFactory;
|
|
|
|
|
// this.marketplaceAccessFactory = marketplaceAccessFactory;
|
|
|
|
|
//}
|
|
|
|
|
|
2023-09-11 14:57:57 +00:00
|
|
|
|
public OnlineCodexNode CreateOnlineCodexNode(CodexAccess access, CodexNodeGroup group)
|
|
|
|
|
{
|
|
|
|
|
//var metricsAccess = metricsAccessFactory.CreateMetricsAccess(access.Container);
|
|
|
|
|
//var marketplaceAccess = marketplaceAccessFactory.CreateMarketplaceAccess(access);
|
2023-09-12 09:43:46 +00:00
|
|
|
|
return new OnlineCodexNode(tools, access, group/*, metricsAccess, marketplaceAccess*/);
|
2023-09-11 14:57:57 +00:00
|
|
|
|
}
|
2023-09-11 09:59:33 +00:00
|
|
|
|
}
|
|
|
|
|
}
|