Skip to content

Remove feature binary serialization #1325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/Renci.SshNet/Common/NetConfServerException.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System;
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
using System.Runtime.Serialization;
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK

namespace Renci.SshNet.Common
{
/// <summary>
/// The exception that is thrown when there is something wrong with the server capabilities.
/// </summary>
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
[Serializable]
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
public class NetConfServerException : SshException
{
/// <summary>
Expand Down Expand Up @@ -39,7 +39,7 @@ public NetConfServerException(string message, Exception innerException)
{
}

#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
/// <summary>
/// Initializes a new instance of the <see cref="NetConfServerException"/> class.
/// </summary>
Expand All @@ -51,6 +51,6 @@ protected NetConfServerException(SerializationInfo info, StreamingContext contex
: base(info, context)
{
}
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
}
}
12 changes: 6 additions & 6 deletions src/Renci.SshNet/Common/ProxyException.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System;
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
using System.Runtime.Serialization;
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK

namespace Renci.SshNet.Common
{
/// <summary>
/// The exception that is thrown when a proxy connection cannot be established.
/// </summary>
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
[Serializable]
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
public class ProxyException : SshException
{
/// <summary>
Expand Down Expand Up @@ -39,7 +39,7 @@ public ProxyException(string message, Exception innerException)
{
}

#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
/// <summary>
/// Initializes a new instance of the <see cref="ProxyException"/> class.
/// </summary>
Expand All @@ -51,6 +51,6 @@ protected ProxyException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
}
}
12 changes: 6 additions & 6 deletions src/Renci.SshNet/Common/ScpException.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System;
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
using System.Runtime.Serialization;
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK

namespace Renci.SshNet.Common
{
/// <summary>
/// The exception that is thrown when SCP error occurred.
/// </summary>
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
[Serializable]
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
public class ScpException : SshException
{
/// <summary>
Expand Down Expand Up @@ -39,7 +39,7 @@ public ScpException(string message, Exception innerException)
{
}

#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
/// <summary>
/// Initializes a new instance of the <see cref="ScpException"/> class.
/// </summary>
Expand All @@ -51,6 +51,6 @@ protected ScpException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
}
}
12 changes: 6 additions & 6 deletions src/Renci.SshNet/Common/SftpPathNotFoundException.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System;
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
using System.Runtime.Serialization;
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK

namespace Renci.SshNet.Common
{
/// <summary>
/// The exception that is thrown when file or directory is not found.
/// </summary>
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
[Serializable]
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
public class SftpPathNotFoundException : SshException
{
/// <summary>
Expand Down Expand Up @@ -39,7 +39,7 @@ public SftpPathNotFoundException(string message, Exception innerException)
{
}

#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
/// <summary>
/// Initializes a new instance of the <see cref="SftpPathNotFoundException"/> class.
/// </summary>
Expand All @@ -51,6 +51,6 @@ protected SftpPathNotFoundException(SerializationInfo info, StreamingContext con
: base(info, context)
{
}
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
}
}
12 changes: 6 additions & 6 deletions src/Renci.SshNet/Common/SftpPermissionDeniedException.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System;
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
using System.Runtime.Serialization;
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK

namespace Renci.SshNet.Common
{
/// <summary>
/// The exception that is thrown when operation permission is denied.
/// </summary>
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
[Serializable]
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
public class SftpPermissionDeniedException : SshException
{
/// <summary>
Expand Down Expand Up @@ -39,7 +39,7 @@ public SftpPermissionDeniedException(string message, Exception innerException)
{
}

#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
/// <summary>
/// Initializes a new instance of the <see cref="SftpPermissionDeniedException"/> class.
/// </summary>
Expand All @@ -51,6 +51,6 @@ protected SftpPermissionDeniedException(SerializationInfo info, StreamingContext
: base(info, context)
{
}
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
}
}
12 changes: 6 additions & 6 deletions src/Renci.SshNet/Common/SshAuthenticationException.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System;
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
using System.Runtime.Serialization;
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK

namespace Renci.SshNet.Common
{
/// <summary>
/// The exception that is thrown when authentication failed.
/// </summary>
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
[Serializable]
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
public class SshAuthenticationException : SshException
{
/// <summary>
Expand Down Expand Up @@ -39,7 +39,7 @@ public SshAuthenticationException(string message, Exception innerException)
{
}

#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
/// <summary>
/// Initializes a new instance of the <see cref="SshAuthenticationException"/> class.
/// </summary>
Expand All @@ -51,6 +51,6 @@ protected SshAuthenticationException(SerializationInfo info, StreamingContext co
: base(info, context)
{
}
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
}
}
12 changes: 6 additions & 6 deletions src/Renci.SshNet/Common/SshConnectionException.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
using System;
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
using System.Runtime.Serialization;
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
using Renci.SshNet.Messages.Transport;

namespace Renci.SshNet.Common
{
/// <summary>
/// The exception that is thrown when connection was terminated.
/// </summary>
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
[Serializable]
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
public class SshConnectionException : SshException
{
/// <summary>
Expand Down Expand Up @@ -70,7 +70,7 @@ public SshConnectionException(string message, DisconnectReason disconnectReasonC
DisconnectReason = disconnectReasonCode;
}

#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
/// <summary>
/// Initializes a new instance of the <see cref="SshConnectionException"/> class.
/// </summary>
Expand All @@ -82,6 +82,6 @@ protected SshConnectionException(SerializationInfo info, StreamingContext contex
: base(info, context)
{
}
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
}
}
12 changes: 6 additions & 6 deletions src/Renci.SshNet/Common/SshException.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System;
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
using System.Runtime.Serialization;
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK

namespace Renci.SshNet.Common
{
/// <summary>
/// The exception that is thrown when SSH exception occurs.
/// </summary>
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
[Serializable]
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
public class SshException : Exception
{
/// <summary>
Expand Down Expand Up @@ -39,7 +39,7 @@ public SshException(string message, Exception inner)
{
}

#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
/// <summary>
/// Initializes a new instance of the <see cref="SshException"/> class.
/// </summary>
Expand All @@ -51,6 +51,6 @@ protected SshException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
}
}
12 changes: 6 additions & 6 deletions src/Renci.SshNet/Common/SshOperationTimeoutException.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System;
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
using System.Runtime.Serialization;
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK

namespace Renci.SshNet.Common
{
/// <summary>
/// The exception that is thrown when operation is timed out.
/// </summary>
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
[Serializable]
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
public class SshOperationTimeoutException : SshException
{
/// <summary>
Expand Down Expand Up @@ -39,7 +39,7 @@ public SshOperationTimeoutException(string message, Exception innerException)
{
}

#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
/// <summary>
/// Initializes a new instance of the <see cref="SshOperationTimeoutException"/> class.
/// </summary>
Expand All @@ -51,6 +51,6 @@ protected SshOperationTimeoutException(SerializationInfo info, StreamingContext
: base(info, context)
{
}
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
}
}
12 changes: 6 additions & 6 deletions src/Renci.SshNet/Common/SshPassPhraseNullOrEmptyException.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using System;
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
using System.Runtime.Serialization;
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK

namespace Renci.SshNet.Common
{
/// <summary>
/// The exception that is thrown when pass phrase for key file is empty or <see langword="null"/>.
/// </summary>
#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
[Serializable]
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
public class SshPassPhraseNullOrEmptyException : SshException
{
/// <summary>
Expand Down Expand Up @@ -39,7 +39,7 @@ public SshPassPhraseNullOrEmptyException(string message, Exception innerExceptio
{
}

#if FEATURE_BINARY_SERIALIZATION
#if NETFRAMEWORK
/// <summary>
/// Initializes a new instance of the <see cref="SshPassPhraseNullOrEmptyException"/> class.
/// </summary>
Expand All @@ -51,6 +51,6 @@ protected SshPassPhraseNullOrEmptyException(SerializationInfo info, StreamingCon
: base(info, context)
{
}
#endif // FEATURE_BINARY_SERIALIZATION
#endif // NETFRAMEWORK
}
}
4 changes: 0 additions & 4 deletions src/Renci.SshNet/Renci.SshNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
<EnableAotAnalyzer>true</EnableAotAnalyzer>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net462' ">
<DefineConstants>$(DefineConstants);FEATURE_BINARY_SERIALIZATION</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0" />
</ItemGroup>
Expand Down
Loading