Browse Source

Bump dependencies

* Bump the dependencies group with 5 updates

Signed-off-by: dependabot[bot] <support@github.com>

* seal types not publicly instantiable (ma0053)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
dependabot[bot] 3 months ago
parent
commit
fc988bd938

+ 7 - 9
Directory.Packages.props

@@ -4,25 +4,23 @@
     <CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
   </PropertyGroup>
   <ItemGroup>
-    <PackageVersion Include="BenchmarkDotNet" Version="0.15.0" />
+    <PackageVersion Include="BenchmarkDotNet" Version="0.15.2" />
     <PackageVersion Include="BouncyCastle.Cryptography" Version="2.6.1" />
     <PackageVersion Include="coverlet.collector" Version="6.0.4" />
     <PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
     <PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
-    <PackageVersion Include="Meziantou.Analyzer" Version="2.0.201" />
-    
+    <PackageVersion Include="Meziantou.Analyzer" Version="2.0.205" />
     <!-- Should stay on LTS .NET releases. -->
     <PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
-    <PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.5" />
-    <PackageVersion Include="MSTest" Version="3.9.1" />
+    <PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.7" />
+    <PackageVersion Include="MSTest" Version="3.9.3" />
     <PackageVersion Include="Moq" Version="4.20.72" />
     <PackageVersion Include="Nerdbank.GitVersioning" Version="3.7.115" />
     <PackageVersion Include="PolySharp" Version="1.15.0" />
-    <PackageVersion Include="SonarAnalyzer.CSharp" Version="10.10.0.116381" />
+    <PackageVersion Include="SonarAnalyzer.CSharp" Version="10.13.0.120203" />
     <PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
-    
     <!-- Should stay on LTS .NET releases. -->
     <PackageVersion Include="System.Formats.Asn1" Version="8.0.2" />
-    <PackageVersion Include="Testcontainers" Version="4.5.0" />
+    <PackageVersion Include="Testcontainers" Version="4.6.0" />
   </ItemGroup>
-</Project>
+</Project>

+ 1 - 1
src/Renci.SshNet/Common/PortForwardEventArgs.cs

@@ -6,7 +6,7 @@ namespace Renci.SshNet.Common
     /// <summary>
     /// Provides data for <see cref="ForwardedPort.RequestReceived"/> event.
     /// </summary>
-    public class PortForwardEventArgs : EventArgs
+    public sealed class PortForwardEventArgs : EventArgs
     {
         /// <summary>
         /// Initializes a new instance of the <see cref="PortForwardEventArgs"/> class.

+ 2 - 2
src/Renci.SshNet/Session.cs

@@ -30,7 +30,7 @@ namespace Renci.SshNet
     /// <summary>
     /// Provides functionality to connect and interact with SSH server.
     /// </summary>
-    public class Session : ISession
+    public sealed class Session : ISession
     {
         internal const byte CarriageReturn = 0x0d;
         internal const byte LineFeed = 0x0a;
@@ -2186,7 +2186,7 @@ namespace Renci.SshNet
         /// Releases unmanaged and - optionally - managed resources.
         /// </summary>
         /// <param name="disposing"><see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources.</param>
-        protected virtual void Dispose(bool disposing)
+        private void Dispose(bool disposing)
         {
             if (_disposed)
             {

+ 1 - 1
src/Renci.SshNet/Sftp/SftpFileAttributes.cs

@@ -10,7 +10,7 @@ namespace Renci.SshNet.Sftp
     /// <summary>
     /// Contains SFTP file attributes.
     /// </summary>
-    public class SftpFileAttributes
+    public sealed class SftpFileAttributes
     {
 #pragma warning disable IDE1006 // Naming Styles
 #pragma warning disable SA1310 // Field names should not contain underscore

+ 2 - 2
src/Renci.SshNet/Sftp/SftpFileStream.cs

@@ -16,7 +16,7 @@ namespace Renci.SshNet.Sftp
 #pragma warning disable IDE0079 // We intentionally want to suppress the below warning.
     [SuppressMessage("Performance", "CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'", Justification = "TODO: This should be addressed in the future.")]
 #pragma warning restore IDE0079
-    public class SftpFileStream : Stream
+    public sealed class SftpFileStream : Stream
     {
         private readonly Lock _lock = new Lock();
         private readonly int _readBufferSize;
@@ -162,7 +162,7 @@ namespace Renci.SshNet.Sftp
         /// <value>
         /// The operating system file handle for the file that the current <see cref="SftpFileStream"/> encapsulates.
         /// </value>
-        public virtual byte[] Handle
+        public byte[] Handle
         {
             get
             {

+ 2 - 4
src/Renci.SshNet/Sftp/SftpFileSystemInformation.cs

@@ -3,11 +3,9 @@
 namespace Renci.SshNet.Sftp
 {
     /// <summary>
-    /// Contains File system information exposed by statvfs@openssh.com request.
+    /// Contains file system information exposed by statvfs@openssh.com request.
     /// </summary>
-#pragma warning disable SA1649 // File name should match first type name
-    public class SftpFileSystemInformation
-#pragma warning restore SA1649 // File name should match first type name
+    public sealed class SftpFileSystemInformation
     {
 #pragma warning disable SA1310 // Field names should not contain underscore
         internal const ulong SSH_FXE_STATVFS_ST_RDONLY = 0x1;

+ 2 - 2
src/Renci.SshNet/Shell.cs

@@ -12,7 +12,7 @@ namespace Renci.SshNet
     /// <summary>
     /// Represents instance of the SSH shell object.
     /// </summary>
-    public class Shell : IDisposable
+    public sealed class Shell : IDisposable
     {
         private const int DefaultBufferSize = 1024;
 
@@ -315,7 +315,7 @@ namespace Renci.SshNet
         /// Releases unmanaged and - optionally - managed resources.
         /// </summary>
         /// <param name="disposing"><see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources.</param>
-        protected virtual void Dispose(bool disposing)
+        private void Dispose(bool disposing)
         {
             if (_disposed)
             {

+ 1 - 1
src/Renci.SshNet/ShellStream.cs

@@ -17,7 +17,7 @@ namespace Renci.SshNet
     /// <summary>
     /// Contains operation for working with SSH Shell.
     /// </summary>
-    public class ShellStream : Stream
+    public sealed class ShellStream : Stream
     {
         private const int DefaultBufferSize = 1024;
 

+ 2 - 2
src/Renci.SshNet/SshCommand.cs

@@ -16,7 +16,7 @@ namespace Renci.SshNet
     /// <summary>
     /// Represents an SSH command that can be executed.
     /// </summary>
-    public class SshCommand : IDisposable
+    public sealed class SshCommand : IDisposable
     {
         private readonly ISession _session;
         private readonly Encoding _encoding;
@@ -630,7 +630,7 @@ namespace Renci.SshNet
         /// Releases unmanaged and - optionally - managed resources.
         /// </summary>
         /// <param name="disposing"><see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources.</param>
-        protected virtual void Dispose(bool disposing)
+        private void Dispose(bool disposing)
         {
             if (_isDisposed)
             {