From e609180b81595c60798854087862f5b19e37ccdb Mon Sep 17 00:00:00 2001 From: Bill Menees Date: Tue, 8 Oct 2024 20:13:21 -0500 Subject: [PATCH] Upgrade NuGet packages Fixed some code analysis warnings and suggestions. --- .editorconfig | 4 ++++ src/Directory.Build.props | 6 +++--- src/Menees.Remoting/Menees.Remoting.csproj | 4 ++-- src/Menees.Remoting/Node.cs | 5 ++--- src/Menees.Remoting/NodeSettings.cs | 4 ++-- src/Menees.Remoting/RmiNode.cs | 3 --- tests/Menees.Remoting.TestHost/LogManager.cs | 1 - 7 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.editorconfig b/.editorconfig index 427e7a1..33fccb7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -44,6 +44,9 @@ csharp_style_prefer_extended_property_pattern = true:suggestion csharp_style_var_for_built_in_types = false:silent csharp_style_var_when_type_is_apparent = false:silent csharp_style_var_elsewhere = false:silent +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = false:silent +csharp_style_prefer_primary_constructors = false:suggestion # Code files [*.{cs,vb}] @@ -216,3 +219,4 @@ dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:sil dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 677d428..9a4c8d1 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -30,7 +30,7 @@ embedded - 1.0.0 + 1.0.1 @@ -77,7 +77,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -85,7 +85,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Menees.Remoting/Menees.Remoting.csproj b/src/Menees.Remoting/Menees.Remoting.csproj index 49db62b..9b740a9 100644 --- a/src/Menees.Remoting/Menees.Remoting.csproj +++ b/src/Menees.Remoting/Menees.Remoting.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/src/Menees.Remoting/Node.cs b/src/Menees.Remoting/Node.cs index 229838f..03f8b15 100644 --- a/src/Menees.Remoting/Node.cs +++ b/src/Menees.Remoting/Node.cs @@ -2,10 +2,9 @@ #region Using Directives -using System.Reflection; +using Menees.Remoting.Json; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; -using Menees.Remoting.Json; #endregion @@ -17,9 +16,9 @@ public abstract class Node : IDisposable #region Protected Data Members private readonly string serverPath; + private readonly Func tryGetType; private bool disposed; - private Func tryGetType; private ISerializer? systemSerializer; private ISerializer? userSerializer; private Func? createLogger; diff --git a/src/Menees.Remoting/NodeSettings.cs b/src/Menees.Remoting/NodeSettings.cs index 030788e..6cde3f3 100644 --- a/src/Menees.Remoting/NodeSettings.cs +++ b/src/Menees.Remoting/NodeSettings.cs @@ -2,10 +2,10 @@ #region Using Directives -using Menees.Remoting.Security; -using Microsoft.Extensions.Logging; using System.Reflection; using System.Runtime.InteropServices; +using Menees.Remoting.Security; +using Microsoft.Extensions.Logging; #endregion diff --git a/src/Menees.Remoting/RmiNode.cs b/src/Menees.Remoting/RmiNode.cs index 1b5ae33..375467c 100644 --- a/src/Menees.Remoting/RmiNode.cs +++ b/src/Menees.Remoting/RmiNode.cs @@ -3,9 +3,6 @@ #region Using Directives using System.Reflection; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; -using Menees.Remoting.Json; #endregion diff --git a/tests/Menees.Remoting.TestHost/LogManager.cs b/tests/Menees.Remoting.TestHost/LogManager.cs index beb2b35..880cbf3 100644 --- a/tests/Menees.Remoting.TestHost/LogManager.cs +++ b/tests/Menees.Remoting.TestHost/LogManager.cs @@ -4,7 +4,6 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; -using System.Collections; #endregion