You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
615 B
22 lines
615 B
using System.IO.Abstractions;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace Recyclarr.TrashLib.Json;
|
|
|
|
public class GuideJsonLoader : IBulkJsonLoader
|
|
{
|
|
private readonly IBulkJsonLoader _loader;
|
|
|
|
public GuideJsonLoader(Func<JsonSerializerSettings, IBulkJsonLoader> jsonLoaderFactory)
|
|
{
|
|
_loader = jsonLoaderFactory(GlobalJsonSerializerSettings.Guide);
|
|
}
|
|
|
|
public ICollection<T> LoadAllFilesAtPaths<T>(
|
|
IEnumerable<IDirectoryInfo> jsonPaths,
|
|
Func<IObservable<LoadedJsonObject<T>>, IObservable<T>>? extra = null)
|
|
{
|
|
return _loader.LoadAllFilesAtPaths(jsonPaths, extra);
|
|
}
|
|
}
|