Skip to content

Commit

Permalink
Remove old features [Part 1] (#1117)
Browse files Browse the repository at this point in the history
Remove obsolete feature switches (now that we've remove support for legacy target frameworks) and remove corresponding conditional code.
  • Loading branch information
WojciechNagorski authored May 9, 2023
1 parent cf85100 commit 8c932fb
Show file tree
Hide file tree
Showing 79 changed files with 60 additions and 1,353 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
using System.Threading;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
#if !FEATURE_SOCKET_DISPOSE
using Renci.SshNet.Common;
#endif // !FEATURE_SOCKET_DISPOSE
using Renci.SshNet.Channels;
using Renci.SshNet.Messages.Connection;
using Renci.SshNet.Tests.Common;
Expand Down
3 changes: 0 additions & 3 deletions src/Renci.SshNet.Tests/Classes/Common/CountdownEventTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
using System.Diagnostics;
using System.Threading;
using Microsoft.VisualStudio.TestTools.UnitTesting;
#if !FEATURE_THREAD_COUNTDOWNEVENT
using CountdownEvent = Renci.SshNet.Common.CountdownEvent;
#endif

namespace Renci.SshNet.Tests.Classes.Common
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
#if !FEATURE_THREAD_COUNTDOWNEVENT
using CountdownEvent = Renci.SshNet.Common.CountdownEvent;
#else
using System.Threading;
#endif

namespace Renci.SshNet.Tests.Classes.Common
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
#if !FEATURE_THREAD_COUNTDOWNEVENT
using CountdownEvent = Renci.SshNet.Common.CountdownEvent;
#else
using System.Threading;
#endif

namespace Renci.SshNet.Tests.Classes.Common
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
Expand Down Expand Up @@ -66,4 +65,3 @@ protected byte[] GenerateRandom(uint length, Random random)
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand Down Expand Up @@ -54,4 +53,3 @@ public void CtorShouldHaveThrownArgumentException()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand Down Expand Up @@ -55,4 +54,3 @@ public void CtorShouldHaveThrownArgumentException()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand Down Expand Up @@ -55,4 +54,3 @@ public void CtorShouldHaveThrownArgumentException()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -152,4 +151,3 @@ public void RequestFStatOnSftpSessionShouldBeInvokedOnce()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand Down Expand Up @@ -55,4 +54,3 @@ public void CtorShouldHaveThrownArgumentException()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -133,4 +132,3 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -133,4 +132,3 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand Down Expand Up @@ -55,4 +54,3 @@ public void CtorShouldHaveThrownArgumentException()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -133,4 +132,3 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -133,4 +132,3 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -132,5 +131,4 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnceWithTruncateAndOnceWithCr
SftpSessionMock.Verify(p => p.RequestOpenAsync(_path, Flags.Write | Flags.CreateNewOrOpen | Flags.Truncate, _cancellationToken), Times.Once);
}
}
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -132,5 +131,4 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
SftpSessionMock.Verify(p => p.RequestOpenAsync(_path, Flags.Write | Flags.CreateNewOrOpen | Flags.Truncate, _cancellationToken), Times.Once);
}
}
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand Down Expand Up @@ -54,4 +53,3 @@ public void CtorShouldHaveThrownArgumentException()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -137,5 +136,4 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
SftpSessionMock.Verify(p => p.RequestOpenAsync(_path, Flags.Read | Flags.CreateNewOrOpen, _cancellationToken), Times.Once);
}
}
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -133,4 +132,3 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -133,4 +132,3 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -139,4 +138,3 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -133,4 +132,3 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -133,4 +132,3 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -56,4 +55,3 @@ public void CtorShouldHaveThrownArgumentException()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -133,4 +132,3 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -132,5 +131,4 @@ public void RequestOpenOnSftpSessionShouldBeInvokedOnce()
SftpSessionMock.Verify(p => p.RequestOpenAsync(_path, Flags.Write | Flags.Truncate, _cancellationToken), Times.Once);
}
}
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand Down Expand Up @@ -155,5 +154,4 @@ public async Task ReadShouldReturnAllRemaningBytesFromReadBufferAndReadAgainWhen
SftpSessionMock.Verify(p => p.RequestReadAsync(_handle, (ulong)(_serverData1Length + _serverData2Length), _readBufferSize, default));
}
}
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand Down Expand Up @@ -149,4 +148,3 @@ public async Task SubsequentReadShouldReadAgainFromCurrentPositionFromServerAndN
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if FEATURE_TAP
using System;
using System;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
Expand Down Expand Up @@ -140,4 +139,3 @@ public async Task SubsequentReadShouldReturnAllRemaningBytesFromReadBufferAndRea
}
}
}
#endif
Loading

0 comments on commit 8c932fb

Please sign in to comment.