refactor: Move Cache code files to Cli project

pull/201/head
Robert Dailey 2 years ago
parent 715d777f9e
commit f06a2c829a

@ -1,6 +1,6 @@
using Autofac; using Autofac;
namespace Recyclarr.TrashLib.Cache; namespace Recyclarr.Cli.Cache;
public class CacheAutofacModule : Module public class CacheAutofacModule : Module
{ {

@ -1,6 +1,6 @@
using System.Runtime.Serialization; using System.Runtime.Serialization;
namespace Recyclarr.TrashLib.Cache; namespace Recyclarr.Cli.Cache;
[Serializable] [Serializable]
public class CacheException : Exception public class CacheException : Exception

@ -1,4 +1,4 @@
namespace Recyclarr.TrashLib.Cache; namespace Recyclarr.Cli.Cache;
[AttributeUsage(AttributeTargets.Class)] [AttributeUsage(AttributeTargets.Class)]
public sealed class CacheObjectNameAttribute : Attribute public sealed class CacheObjectNameAttribute : Attribute

@ -1,6 +1,6 @@
using Recyclarr.TrashLib.Config.Services; using Recyclarr.TrashLib.Config.Services;
namespace Recyclarr.TrashLib.Cache; namespace Recyclarr.Cli.Cache;
public class CachePersister : ICachePersister public class CachePersister : ICachePersister
{ {

@ -1,6 +1,6 @@
using Recyclarr.TrashLib.Models; using Recyclarr.TrashLib.Models;
namespace Recyclarr.TrashLib.Cache; namespace Recyclarr.Cli.Cache;
[CacheObjectName("custom-format-cache")] [CacheObjectName("custom-format-cache")]
public record CustomFormatCache public record CustomFormatCache

@ -1,6 +1,6 @@
using Recyclarr.TrashLib.Config.Services; using Recyclarr.TrashLib.Config.Services;
namespace Recyclarr.TrashLib.Cache; namespace Recyclarr.Cli.Cache;
public interface ICachePersister public interface ICachePersister
{ {

@ -1,6 +1,6 @@
using Recyclarr.TrashLib.Config.Services; using Recyclarr.TrashLib.Config.Services;
namespace Recyclarr.TrashLib.Cache; namespace Recyclarr.Cli.Cache;
public interface IServiceCache public interface IServiceCache
{ {

@ -7,7 +7,7 @@ using Recyclarr.Common.Extensions;
using Recyclarr.TrashLib.Config.Services; using Recyclarr.TrashLib.Config.Services;
using Recyclarr.TrashLib.Interfaces; using Recyclarr.TrashLib.Interfaces;
namespace Recyclarr.TrashLib.Cache; namespace Recyclarr.Cli.Cache;
public partial class ServiceCache : IServiceCache public partial class ServiceCache : IServiceCache
{ {

@ -5,6 +5,7 @@ using Autofac.Extras.Ordering;
using AutoMapper.Contrib.Autofac.DependencyInjection; using AutoMapper.Contrib.Autofac.DependencyInjection;
using AutoMapper.EquivalencyExpression; using AutoMapper.EquivalencyExpression;
using FluentValidation; using FluentValidation;
using Recyclarr.Cli.Cache;
using Recyclarr.Cli.Console.Helpers; using Recyclarr.Cli.Console.Helpers;
using Recyclarr.Cli.Console.Setup; using Recyclarr.Cli.Console.Setup;
using Recyclarr.Cli.Logging; using Recyclarr.Cli.Logging;
@ -36,6 +37,7 @@ public static class CompositionRoot
builder.RegisterModule<MigrationAutofacModule>(); builder.RegisterModule<MigrationAutofacModule>();
builder.RegisterModule<TrashLibAutofacModule>(); builder.RegisterModule<TrashLibAutofacModule>();
builder.RegisterModule<ServiceProcessorsAutofacModule>(); builder.RegisterModule<ServiceProcessorsAutofacModule>();
builder.RegisterModule<CacheAutofacModule>();
builder.RegisterType<CacheStoragePath>().As<ICacheStoragePath>(); builder.RegisterType<CacheStoragePath>().As<ICacheStoragePath>();
builder.RegisterType<FileSystem>().As<IFileSystem>(); builder.RegisterType<FileSystem>().As<IFileSystem>();

@ -1,10 +1,10 @@
using Autofac; using Autofac;
using Autofac.Extras.AggregateService; using Autofac.Extras.AggregateService;
using Recyclarr.Cli.Cache;
using Recyclarr.Cli.Pipelines.CustomFormat.Api; using Recyclarr.Cli.Pipelines.CustomFormat.Api;
using Recyclarr.Cli.Pipelines.CustomFormat.Guide; using Recyclarr.Cli.Pipelines.CustomFormat.Guide;
using Recyclarr.Cli.Pipelines.CustomFormat.Models; using Recyclarr.Cli.Pipelines.CustomFormat.Models;
using Recyclarr.Cli.Pipelines.CustomFormat.PipelinePhases; using Recyclarr.Cli.Pipelines.CustomFormat.PipelinePhases;
using Recyclarr.TrashLib.Cache;
namespace Recyclarr.Cli.Pipelines.CustomFormat; namespace Recyclarr.Cli.Pipelines.CustomFormat;

@ -1,9 +1,9 @@
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using Recyclarr.Cli.Cache;
using Recyclarr.Cli.Console.Settings; using Recyclarr.Cli.Console.Settings;
using Recyclarr.Cli.Pipelines.CustomFormat.Models; using Recyclarr.Cli.Pipelines.CustomFormat.Models;
using Recyclarr.Cli.Pipelines.CustomFormat.PipelinePhases; using Recyclarr.Cli.Pipelines.CustomFormat.PipelinePhases;
using Recyclarr.Common.Extensions; using Recyclarr.Common.Extensions;
using Recyclarr.TrashLib.Cache;
using Recyclarr.TrashLib.Config.Services; using Recyclarr.TrashLib.Config.Services;
using Recyclarr.TrashLib.Models; using Recyclarr.TrashLib.Models;

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using Recyclarr.Cli.Cache;
using Recyclarr.Cli.Pipelines.CustomFormat.Models; using Recyclarr.Cli.Pipelines.CustomFormat.Models;
using Recyclarr.Common.Extensions; using Recyclarr.Common.Extensions;
using Recyclarr.TrashLib.Cache;
using Recyclarr.TrashLib.Config.Services; using Recyclarr.TrashLib.Config.Services;
using Recyclarr.TrashLib.Models; using Recyclarr.TrashLib.Models;

@ -3,7 +3,6 @@ using Autofac.Extras.Ordering;
using Recyclarr.Common; using Recyclarr.Common;
using Recyclarr.Common.FluentValidation; using Recyclarr.Common.FluentValidation;
using Recyclarr.TrashLib.ApiServices; using Recyclarr.TrashLib.ApiServices;
using Recyclarr.TrashLib.Cache;
using Recyclarr.TrashLib.Compatibility; using Recyclarr.TrashLib.Compatibility;
using Recyclarr.TrashLib.Config; using Recyclarr.TrashLib.Config;
using Recyclarr.TrashLib.Http; using Recyclarr.TrashLib.Http;
@ -31,7 +30,6 @@ public class TrashLibAutofacModule : Module
builder.RegisterModule<ApiServicesAutofacModule>(); builder.RegisterModule<ApiServicesAutofacModule>();
builder.RegisterModule<ConfigAutofacModule>(); builder.RegisterModule<ConfigAutofacModule>();
builder.RegisterType<ServiceRequestBuilder>().As<IServiceRequestBuilder>(); builder.RegisterType<ServiceRequestBuilder>().As<IServiceRequestBuilder>();
builder.RegisterModule<CacheAutofacModule>();
builder.RegisterType<FlurlClientFactory>().As<IFlurlClientFactory>().SingleInstance(); builder.RegisterType<FlurlClientFactory>().As<IFlurlClientFactory>().SingleInstance();
} }

@ -1,10 +1,10 @@
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using Recyclarr.TrashLib.Cache; using Recyclarr.Cli.Cache;
using Recyclarr.TrashLib.Config.Services; using Recyclarr.TrashLib.Config.Services;
using Recyclarr.TrashLib.Models; using Recyclarr.TrashLib.Models;
using Recyclarr.TrashLib.TestLibrary; using Recyclarr.TrashLib.TestLibrary;
namespace Recyclarr.TrashLib.Tests.Cache; namespace Recyclarr.Cli.Tests.Cache;
[TestFixture] [TestFixture]
[Parallelizable(ParallelScope.All)] [Parallelizable(ParallelScope.All)]

@ -1,9 +1,9 @@
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using Recyclarr.TrashLib.Cache; using Recyclarr.Cli.Cache;
using Recyclarr.TrashLib.Config.Services; using Recyclarr.TrashLib.Config.Services;
using Recyclarr.TrashLib.Interfaces; using Recyclarr.TrashLib.Interfaces;
namespace Recyclarr.TrashLib.Tests.Cache; namespace Recyclarr.Cli.Tests.Cache;
[TestFixture] [TestFixture]
[Parallelizable(ParallelScope.All)] [Parallelizable(ParallelScope.All)]

@ -1,8 +1,8 @@
using Recyclarr.Cli.Cache;
using Recyclarr.Cli.Pipelines.CustomFormat; using Recyclarr.Cli.Pipelines.CustomFormat;
using Recyclarr.Cli.Pipelines.CustomFormat.Models; using Recyclarr.Cli.Pipelines.CustomFormat.Models;
using Recyclarr.Cli.Pipelines.CustomFormat.PipelinePhases; using Recyclarr.Cli.Pipelines.CustomFormat.PipelinePhases;
using Recyclarr.Cli.TestLibrary; using Recyclarr.Cli.TestLibrary;
using Recyclarr.TrashLib.Cache;
using Recyclarr.TrashLib.Models; using Recyclarr.TrashLib.Models;
using Recyclarr.TrashLib.TestLibrary; using Recyclarr.TrashLib.TestLibrary;

Loading…
Cancel
Save