Remove XApi, WinRM, LocalCmd, HTTP API, TLS probe, SQL deploy model, and deploy UI. Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
696 B
C#
19 lines
696 B
C#
using ZA.CoreService.ESBCertificateManager.Models;
|
|
|
|
namespace ZA.CoreService.ESBCertificateManager.Data;
|
|
|
|
public static class TargetRepositoryFactory
|
|
{
|
|
public static async Task<(ITargetRepository Repository, string LoadMessage)> CreateAsync(
|
|
AppSettings settings,
|
|
CancellationToken cancellationToken = default)
|
|
{
|
|
string samplePath = Path.GetFullPath(
|
|
Path.Combine(AppContext.BaseDirectory, settings.SampleTargetsPath));
|
|
|
|
ITargetRepository jsonRepo = new JsonTargetRepository(samplePath);
|
|
_ = await jsonRepo.GetActiveTargetsAsync(cancellationToken);
|
|
return (jsonRepo, $"Ziele geladen aus {jsonRepo.SourceDescription}.");
|
|
}
|
|
}
|