refactor: Move AppPaths to TrashLib

gui
Robert Dailey 3 years ago
parent bffaad05ee
commit 391e12c5f6

@ -1,4 +1,7 @@
using System.IO.Abstractions;
using Autofac;
using Common;
using TrashLib.Startup;
namespace Recyclarr.Gui;
@ -6,6 +9,12 @@ public static class CompositionRoot
{
public static void Setup(ContainerBuilder builder)
{
builder.RegisterModule<CommonAutofacModule>();
builder.RegisterType<FileSystem>().As<IFileSystem>();
builder.RegisterType<DefaultAppDataSetup>();
builder.Register(c => c.Resolve<DefaultAppDataSetup>().CreateAppPaths())
.As<IAppPaths>()
.SingleInstance();
}
}

@ -1,4 +1,5 @@
@page "/"
@using Microsoft.AspNetCore.Mvc.TagHelpers
@namespace Recyclarr.Gui.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{

@ -1,4 +1,5 @@
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Mvc.TagHelpers
@namespace Recyclarr.Gui.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

@ -6,7 +6,7 @@ using JetBrains.Annotations;
using Recyclarr.Logging;
using Serilog;
using Serilog.Events;
using TrashLib;
using TrashLib.Startup;
namespace Recyclarr.Command;

@ -4,7 +4,7 @@ using CliFx.Exceptions;
using Common;
using JetBrains.Annotations;
using Serilog;
using TrashLib;
using TrashLib.Startup;
namespace Recyclarr.Command;

@ -1,6 +1,6 @@
using System.IO.Abstractions;
using TrashLib;
using TrashLib.Cache;
using TrashLib.Startup;
namespace Recyclarr.Command.Helpers;

@ -2,6 +2,7 @@ using System.IO.Abstractions;
using Common;
using Serilog;
using TrashLib;
using TrashLib.Startup;
namespace Recyclarr;

@ -1,4 +1,4 @@
using TrashLib;
using TrashLib.Startup;
namespace Recyclarr.Logging;

@ -1,11 +1,11 @@
using System.IO.Abstractions;
using Serilog;
using Serilog.Events;
using TrashLib;
using TrashLib.Startup;
namespace Recyclarr.Logging;
public class LoggerFactory
internal class LoggerFactory
{
private readonly IAppPaths _paths;

@ -2,7 +2,7 @@ using System.IO.Abstractions;
using CliFx.Infrastructure;
using Common.Extensions;
using JetBrains.Annotations;
using TrashLib;
using TrashLib.Startup;
namespace Recyclarr.Migration.Steps;

@ -1,4 +1,5 @@
using System.IO.Abstractions;
using TrashLib.Startup;
namespace TrashLib;

@ -1,3 +1,5 @@
using TrashLib.Startup;
namespace TrashLib.Config.Settings;
public class SettingsPersister : ISettingsPersister

@ -6,6 +6,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Serilog;
using TrashLib.Radarr.CustomFormat.Models;
using TrashLib.Startup;
namespace TrashLib.Radarr.CustomFormat.Guide;

@ -1,6 +1,7 @@
using System.IO.Abstractions;
using System.Text.RegularExpressions;
using Common.Extensions;
using TrashLib.Startup;
namespace TrashLib.Radarr.QualityDefinition;

@ -3,6 +3,7 @@ using Common;
using LibGit2Sharp;
using Serilog;
using TrashLib.Config.Settings;
using TrashLib.Startup;
using VersionControl;
namespace TrashLib.Repo;

@ -1,6 +1,7 @@
using System.IO.Abstractions;
using System.Text.RegularExpressions;
using Common.Extensions;
using TrashLib.Startup;
namespace TrashLib.Sonarr.QualityDefinition;

@ -4,6 +4,7 @@ using Common.FluentValidation;
using MoreLinq;
using Newtonsoft.Json;
using Serilog;
using TrashLib.Startup;
namespace TrashLib.Sonarr.ReleaseProfile.Guide;

@ -1,6 +1,6 @@
using System.IO.Abstractions;
namespace TrashLib;
namespace TrashLib.Startup;
public interface IAppPaths
{
Loading…
Cancel
Save