refactor: Enable implicit using and run code cleanup

pull/47/head
Robert Dailey 2 years ago
parent 4f8d76a62a
commit 546bd3bf5e

@ -1069,7 +1069,7 @@ resharper_remove_blank_lines_near_braces_in_declarations = true
resharper_remove_this_qualifier = true
resharper_requires_expression_braces = next_line
resharper_resx_attribute_indent = single_indent
resharper_resx_linebreak_before_elements =
resharper_resx_linebreak_before_elements =
resharper_resx_max_blank_lines_between_tags = 0
resharper_resx_max_line_length = 2147483647
resharper_resx_pi_attribute_style = do_not_touch
@ -1292,7 +1292,7 @@ resharper_xmldoc_wrap_lines = true
resharper_xmldoc_wrap_tags_and_pi = true
resharper_xmldoc_wrap_text = true
resharper_xml_attribute_indent = align_by_first_attribute
resharper_xml_linebreak_before_elements =
resharper_xml_linebreak_before_elements =
resharper_xml_max_blank_lines_between_tags = 2
resharper_xml_max_line_length = 120
resharper_xml_pi_attribute_style = do_not_touch

@ -1,5 +1,4 @@
using System.Collections.Generic;
using Common.Extensions;
using Common.Extensions;
using FluentAssertions;
using NUnit.Framework;

@ -1,5 +1,4 @@
using System;
using FluentAssertions;
using FluentAssertions;
using NUnit.Framework;
namespace Common.Tests;

@ -1,6 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
namespace Common.Extensions;

@ -1,6 +1,4 @@
using System.Collections.Generic;
namespace Common.Extensions;
namespace Common.Extensions;
public static class DictionaryExtensions
{

@ -1,6 +1,3 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using FluentValidation;
using FluentValidation.Validators;

@ -1,4 +1,3 @@
using System;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using Serilog;

@ -1,5 +1,4 @@
using System;
using System.Globalization;
using System.Globalization;
namespace Common.Extensions;

@ -1,4 +1,3 @@
using System.IO;
using System.IO.Abstractions;
namespace Common;

@ -1,4 +1,3 @@
using System;
using Newtonsoft.Json.Linq;
namespace Common;

@ -1,4 +1,3 @@
using System.Net.Http;
using Flurl.Http.Configuration;
namespace Common.Networking;

@ -1,5 +1,4 @@
using System;
using System.Reactive.Linq;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Text;

@ -1,6 +1,4 @@
using System;
using System.IO;
using System.Reflection;
using System.Reflection;
using System.Text;
namespace Common;

@ -1,4 +1,3 @@
using System;
using System.Collections;
using System.ComponentModel.DataAnnotations;

@ -1,4 +1,3 @@
using System;
using System.ComponentModel.DataAnnotations;
using YamlDotNet.Core;
using YamlDotNet.Serialization;

@ -1,5 +1,4 @@
using System;
using YamlDotNet.Core;
using YamlDotNet.Core;
using YamlDotNet.Core.Events;
using YamlDotNet.Serialization;

@ -4,7 +4,7 @@
<LangVersion>latestmajor</LangVersion>
<Nullable>enable</Nullable>
<WarningLevel>9999</WarningLevel>
<!-- <TreatWarningsAsErrors>true</TreatWarningsAsErrors> -->
<ImplicitUsings>enable</ImplicitUsings>
<DebugType>embedded</DebugType>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>

@ -1,4 +1,3 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using Autofac;

@ -7,7 +7,7 @@ public static class NSubstituteFixture
{
public static Fixture Create()
{
var fixture = new Fixture()
var fixture = new Fixture
{
OmitAutoProperties = true
};

@ -1,6 +1,4 @@
using System;
using System.Diagnostics;
using System.Linq;
using FluentAssertions.Execution;
using NSubstitute.Core.Arguments;

@ -1,5 +1,4 @@
using System.IO;
using System.Text;
using System.Text;
namespace TestLibrary;

@ -1,5 +1,4 @@
using System.IO.Abstractions;
using System.Threading.Tasks;
using CliFx.Infrastructure;
using NSubstitute;
using NUnit.Framework;

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using Autofac;
using Autofac;
using FluentAssertions;
using NUnit.Framework;
using Trash.Command;

@ -1,7 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Autofac;
using Autofac.Core;
using FluentAssertions;

@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Diagnostics.CodeAnalysis;
using System.IO.Abstractions;
using System.Linq;
using System.Text;
using Autofac;
using AutoFixture.NUnit3;

@ -1,7 +1,4 @@
using System;
using System.IO;
namespace Trash;
namespace Trash;
internal static class AppPaths
{

@ -1,5 +1,4 @@
using System.IO.Abstractions;
using System.Threading.Tasks;
using CliFx;
using CliFx.Attributes;
using CliFx.Exceptions;

@ -1,6 +1,4 @@
using System;
namespace Trash.Command.Helpers;
namespace Trash.Command.Helpers;
public class ActiveServiceCommandProvider : IActiveServiceCommandProvider
{

@ -1,5 +1,4 @@
using System;
using Autofac;
using Autofac;
namespace Trash.Command.Helpers;

@ -1,6 +1,4 @@
using System.Collections.Generic;
namespace Trash.Command;
namespace Trash.Command;
public interface IServiceCommand
{

@ -1,7 +1,4 @@
using System;
using System.IO;
using System.Threading.Tasks;
using CliFx.Attributes;
using CliFx.Attributes;
using Flurl.Http;
using JetBrains.Annotations;
using Serilog;

@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using CliFx;
using CliFx.Attributes;
using CliFx.Exceptions;

@ -1,7 +1,4 @@
using System;
using System.IO;
using System.Threading.Tasks;
using CliFx.Attributes;
using CliFx.Attributes;
using Flurl.Http;
using JetBrains.Annotations;
using Serilog;

@ -1,6 +1,4 @@
using System;
using System.IO;
using System.IO.Abstractions;
using System.IO.Abstractions;
using System.Reflection;
using Autofac;
using Autofac.Core.Activators.Reflection;

@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using FluentValidation.Results;

@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.IO;
using System.IO.Abstractions;
using System.Linq;
using System.IO.Abstractions;
using FluentValidation;
using TrashLib.Config;
using TrashLib.Config.Services;

@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.IO;
using TrashLib.Config.Services;
using TrashLib.Config.Services;
namespace Trash.Config;

@ -1,5 +1,4 @@
using System;
using Autofac;
using Autofac;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.ObjectFactories;

@ -1,5 +1,4 @@
using System.IO.Abstractions;
using System.Linq;
namespace Trash;

@ -1,6 +1,5 @@
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
using Autofac;
using CliFx;
using Trash.Command.Helpers;

@ -1,5 +1,4 @@
using System.Linq;
using TrashLib.Radarr.CustomFormat.Models;
using TrashLib.Radarr.CustomFormat.Models;
namespace Trash.TestLibrary;

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Abstractions;
using System.IO.Abstractions;
using FluentAssertions;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

@ -1,4 +1,3 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using FluentAssertions;
using Newtonsoft.Json.Linq;

@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
using System.Diagnostics.CodeAnalysis;
using Common;
using FluentAssertions;
using Newtonsoft.Json.Linq;

@ -1,4 +1,3 @@
using System.Collections.Generic;
using FluentAssertions;
using Newtonsoft.Json.Linq;
using NUnit.Framework;

@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using FluentAssertions;
using Newtonsoft.Json;

@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using Newtonsoft.Json.Linq;
using NUnit.Framework;

@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Newtonsoft.Json.Linq;
using NSubstitute;

@ -1,5 +1,3 @@
using System.Linq;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using NSubstitute;
using NUnit.Framework;

@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using FluentAssertions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

@ -1,4 +1,3 @@
using System.Collections.Generic;
using FluentAssertions;
using FluentAssertions.Json;
using Newtonsoft.Json;

@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Collections.ObjectModel;
using Autofac;
using FluentAssertions;
using FluentValidation;

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using System.Threading.Tasks;
using AutoMapper;
using FluentAssertions;
using Newtonsoft.Json;

@ -1,5 +1,4 @@
using System.Collections.Generic;
using FluentAssertions;
using FluentAssertions;
using NUnit.Framework;
using TrashLib.Sonarr.Config;
using TrashLib.Sonarr.ReleaseProfile;

@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Common;
using FluentAssertions;
using NUnit.Framework;

@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Autofac;
using FluentAssertions;
using FluentValidation;

@ -1,6 +1,4 @@
using System;
namespace TrashLib.Cache;
namespace TrashLib.Cache;
[AttributeUsage(AttributeTargets.Class)]
internal sealed class CacheObjectNameAttribute : Attribute

@ -1,6 +1,4 @@
using System;
using System.Data.HashFunction.FNV;
using System.IO;
using System.Data.HashFunction.FNV;
using System.IO.Abstractions;
using System.Reflection;
using System.Text;

@ -1,6 +1,4 @@
using System;
namespace TrashLib.Config.Services;
namespace TrashLib.Config.Services;
internal class ConfigurationProvider : IConfigurationProvider
{

@ -1,4 +1,3 @@
using System;
using System.Runtime.Serialization;
namespace TrashLib.ExceptionTypes;

@ -1,4 +1,3 @@
using System;
using Flurl;
using Flurl.Http;
using Serilog;

@ -1,4 +1,3 @@
using System;
using Flurl;
using Flurl.Http.Configuration;
using Serilog;

@ -1,5 +1,4 @@
using System.Collections.Generic;
using JetBrains.Annotations;
using JetBrains.Annotations;
using TrashLib.Config.Services;
using TrashLib.Radarr.QualityDefinition;

@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Flurl.Http;
using Newtonsoft.Json.Linq;
using TrashLib.Config.Services;

@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Linq;
using TrashLib.Radarr.CustomFormat.Models;
namespace TrashLib.Radarr.CustomFormat.Api;

@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Linq;
namespace TrashLib.Radarr.CustomFormat.Api;

@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Flurl.Http;
using Newtonsoft.Json.Linq;
using TrashLib.Config.Services;

@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Common.Extensions;
using Serilog;
using TrashLib.Cache;

@ -1,7 +1,4 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using Common.Extensions;
using Common.Extensions;
using Serilog;
using TrashLib.Radarr.Config;
using TrashLib.Radarr.CustomFormat.Processors;

@ -1,5 +1,3 @@
using System.Collections.Generic;
namespace TrashLib.Radarr.CustomFormat.Guide;
public interface IRadarrGuideService

@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Abstractions;
using System.Linq;
using System.Threading.Tasks;
using Common;
using LibGit2Sharp;
using Serilog;

@ -1,4 +1,3 @@
using System.Collections.Generic;
using TrashLib.Radarr.CustomFormat.Models;
using TrashLib.Radarr.CustomFormat.Models.Cache;

@ -1,5 +1,4 @@
using System.Threading.Tasks;
using TrashLib.Radarr.Config;
using TrashLib.Radarr.Config;
namespace TrashLib.Radarr.CustomFormat;

@ -1,4 +1,3 @@
using System.Collections.Generic;
using TrashLib.Radarr.Config;
namespace TrashLib.Radarr.CustomFormat.Models;

@ -1,5 +1,4 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using Newtonsoft.Json.Linq;
using TrashLib.Radarr.CustomFormat.Models.Cache;

@ -1,6 +1,4 @@
using System.Collections.Generic;
namespace TrashLib.Radarr.CustomFormat.Models;
namespace TrashLib.Radarr.CustomFormat.Models;
public record FormatMappingEntry(ProcessedCustomFormatData CustomFormat, int Score);

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using TrashLib.Radarr.Config;
using TrashLib.Radarr.Config;
using TrashLib.Radarr.CustomFormat.Guide;
using TrashLib.Radarr.CustomFormat.Models;
using TrashLib.Radarr.CustomFormat.Models.Cache;

@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Common.Extensions;
using TrashLib.Radarr.Config;
using TrashLib.Radarr.CustomFormat.Models;

@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Common;
using Common.Extensions;
using Newtonsoft.Json.Linq;

@ -1,4 +1,3 @@
using System.Collections.Generic;
using TrashLib.Radarr.Config;
using TrashLib.Radarr.CustomFormat.Models;

@ -1,4 +1,3 @@
using System.Collections.Generic;
using TrashLib.Radarr.Config;
using TrashLib.Radarr.CustomFormat.Models;
using TrashLib.Radarr.CustomFormat.Models.Cache;

@ -1,4 +1,3 @@
using System.Collections.Generic;
using TrashLib.Radarr.CustomFormat.Models;
namespace TrashLib.Radarr.CustomFormat.Processors.GuideSteps;

@ -1,4 +1,3 @@
using System.Collections.Generic;
using TrashLib.Radarr.CustomFormat.Models;
namespace TrashLib.Radarr.CustomFormat.Processors.GuideSteps;

@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using TrashLib.Radarr.Config;
using TrashLib.Radarr.CustomFormat.Models;
using TrashLib.Radarr.CustomFormat.Models.Cache;

@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using TrashLib.Radarr.CustomFormat.Models;
using TrashLib.Radarr.CustomFormat.Models.Cache;
using TrashLib.Radarr.CustomFormat.Processors.PersistenceSteps;

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using TrashLib.Config.Services;
using TrashLib.Config.Services;
using TrashLib.Radarr.Config;
using TrashLib.Radarr.CustomFormat.Api;
using TrashLib.Radarr.CustomFormat.Models;

@ -1,4 +1,3 @@
using System.Threading.Tasks;
using TrashLib.Radarr.CustomFormat.Api;
namespace TrashLib.Radarr.CustomFormat.Processors.PersistenceSteps;

@ -1,4 +1,3 @@
using System.Threading.Tasks;
using TrashLib.Radarr.CustomFormat.Api;
namespace TrashLib.Radarr.CustomFormat.Processors.PersistenceSteps;

@ -1,4 +1,3 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using TrashLib.Radarr.CustomFormat.Models;
using TrashLib.Radarr.CustomFormat.Models.Cache;

@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using TrashLib.Radarr.CustomFormat.Api;
using TrashLib.Radarr.CustomFormat.Models;

@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Common.Extensions;
using Newtonsoft.Json.Linq;
using TrashLib.Radarr.CustomFormat.Models;

@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Common;
using Common.Extensions;
using Newtonsoft.Json.Linq;

@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using TrashLib.Radarr.QualityDefinition.Api.Objects;
using TrashLib.Radarr.QualityDefinition.Api.Objects;
namespace TrashLib.Radarr.QualityDefinition.Api;

@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Flurl.Http;
using Flurl.Http;
using TrashLib.Config.Services;
using TrashLib.Radarr.QualityDefinition.Api.Objects;

@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Threading.Tasks;
namespace TrashLib.Radarr.QualityDefinition;
namespace TrashLib.Radarr.QualityDefinition;
public interface IRadarrQualityDefinitionGuideParser
{

@ -1,4 +1,3 @@
using System.Threading.Tasks;
using TrashLib.Radarr.Config;
namespace TrashLib.Radarr.QualityDefinition;

@ -1,5 +1,4 @@
using System;
using TrashLib.Sonarr.QualityDefinition;
using TrashLib.Sonarr.QualityDefinition;
namespace TrashLib.Radarr.QualityDefinition;

@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
using Common.Extensions;
using Flurl.Http;

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Serilog;
using Serilog;
using TrashLib.Radarr.Config;
using TrashLib.Radarr.QualityDefinition.Api;
using TrashLib.Radarr.QualityDefinition.Api.Objects;

@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using TrashLib.Sonarr.Api.Objects;
using TrashLib.Sonarr.Api.Objects;
namespace TrashLib.Sonarr.Api;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save