From 01fd7a3ca8a9d153f3d7f13a4bd4770a7943f65c Mon Sep 17 00:00:00 2001
From: Glenn <5834289+glennawatson@users.noreply.github.com>
Date: Mon, 5 Apr 2021 20:34:07 +1000
Subject: [PATCH 1/2] housekeeping: Use editorconfig for analyzer settings
(#691)
Fix all outstanding warnings
---
src/Directory.build.props | 4 +-
.../AutofacDependencyResolver.cs | 4 +-
...alTests.SplatUIProject.net5.0.approved.txt | 2 +-
....SplatUIProject.netcoreapp3.1.approved.txt | 2 +-
.../Cocoa/Bitmaps/PlatformBitmapLoader.cs | 6 +-
.../WinRT/Bitmaps/PlatformBitmapLoader.cs | 4 +-
.../net4/Bitmaps/PlatformBitmapLoader.cs | 4 +-
.../net5/Bitmaps/PlatformBitmapLoader.cs | 4 +-
.../Bitmaps/PlatformBitmapLoader.cs | 4 +-
...xceptionlessFeatureUsageTrackingSession.cs | 4 +-
.../MicrosoftDependencyResolver.cs | 2 +-
src/Splat.NLog/NLogLogger.cs | 40 +--
src/Splat.Prism.Forms/PrismApplication.cs | 2 +-
src/Splat.Prism/SplatContainerExtension.cs | 5 +
.../RaygunFeatureUsageTrackingSession.cs | 4 +-
src/Splat.Serilog/SerilogFullLogger.cs | 60 ++--
.../SimpleInjectorDependencyResolver.cs | 15 +-
.../SimpleInjectorInitializer.cs | 28 +-
.../Splat.SimpleInjector.csproj | 3 +-
.../TransientSimpleInjectorRegistration.cs | 2 +-
...ovalTests.SplatProject.net5.0.approved.txt | 8 +-
...ts.SplatProject.netcoreapp3.1.approved.txt | 8 +-
src/Splat.Tests/ApiExtensions.cs | 2 +-
...ableFeatureUsageTrackingExtensionsTests.cs | 1 +
.../Logging/Helpers/FormatHelper.cs | 1 +
src/Splat.Tests/Logging/StaticLoggerTests.cs | 2 -
src/Splat.sln | 5 +-
.../EnableFeatureUsageTrackingExtensions.cs | 17 +-
src/Splat/Logging/AllocationFreeLoggerBase.cs | 16 +-
src/Splat/Logging/LogHost.cs | 2 +-
src/Splat/Logging/LogLevel.cs | 1 +
src/Splat/MemoizingMRUCache.cs | 8 +-
src/Splat/ServiceLocation/Locator.cs | 1 +
src/analyzers.ruleset | 282 ------------------
34 files changed, 148 insertions(+), 405 deletions(-)
delete mode 100644 src/analyzers.ruleset
diff --git a/src/Directory.build.props b/src/Directory.build.props
index a2c6d54d4..76f3a581a 100644
--- a/src/Directory.build.props
+++ b/src/Directory.build.props
@@ -5,8 +5,6 @@
AnyCPU
$(MSBuildProjectName.Contains('Tests'))
embedded
- $(MSBuildThisFileDirectory)analyzers.ruleset
-
.NET Foundation and Contributors
Copyright (c) .NET Foundation and Contributors
MIT
@@ -68,7 +66,7 @@
-
+
diff --git a/src/Splat.Autofac/AutofacDependencyResolver.cs b/src/Splat.Autofac/AutofacDependencyResolver.cs
index 364854e0b..6c41b5e27 100644
--- a/src/Splat.Autofac/AutofacDependencyResolver.cs
+++ b/src/Splat.Autofac/AutofacDependencyResolver.cs
@@ -71,7 +71,7 @@ public void SetLifetimeScope(ILifetimeScope lifetimeScope)
{
if (_lifetimeScopeSet)
{
- throw new Exception("Lifetime scope of the Autofac resolver has already been set");
+ throw new InvalidOperationException("Lifetime scope of the Autofac resolver has already been set");
}
_lifetimeScopeSet = true;
@@ -135,7 +135,7 @@ public virtual void Register(Func