Skip to content
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

drop obsolete #if directives #1394

Merged
merged 1 commit into from
May 6, 2024
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
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using System;
using System.Linq;
using Renci.SshNet.Abstractions;
#if SILVERLIGHT
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif

namespace Renci.SshNet.Tests.Abstractions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using System;
using System.Net;
using System.Net.Sockets;
#if SILVERLIGHT
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif
using Renci.SshNet.Abstractions;

namespace Renci.SshNet.Tests.Abstractions
Expand Down Expand Up @@ -53,14 +49,12 @@ public void ShouldReturnHostAddressesOfLocalHostWhenHostNameOrAddressIsEmpty()
var addresses = DnsAbstraction.GetHostAddresses(hostNameOrAddress);
Assert.IsNotNull(addresses);

#if !SILVERLIGHT
var hostEntry = Dns.GetHostEntry(Dns.GetHostName());
Assert.IsNotNull(hostEntry);

Assert.AreEqual(hostEntry.AddressList.Length, addresses.Length);
for (var i = 0; i < hostEntry.AddressList.Length; i++)
Assert.AreEqual(hostEntry.AddressList[i], addresses[i]);
#endif
}

[TestMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
using System.IO;
using System.Linq;
using Renci.SshNet.Abstractions;
#if SILVERLIGHT
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif

namespace Renci.SshNet.Tests.Abstractions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System.Net.Sockets;
using Renci.SshNet.Abstractions;
#if SILVERLIGHT
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif

namespace Renci.SshNet.Tests.Abstractions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Threading;
#if SILVERLIGHT
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif
using Renci.SshNet.Abstractions;

namespace Renci.SshNet.Tests.Abstractions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
#if SILVERLIGHT
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif

namespace Renci.SshNet.Tests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
#if SILVERLIGHT
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif

namespace Renci.SshNet.Tests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
#if SILVERLIGHT
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif

namespace Renci.SshNet.Tests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
#if SILVERLIGHT
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif

namespace Renci.SshNet.Tests
{
Expand Down
4 changes: 0 additions & 4 deletions test/Renci.SshNet.Shared.Tests/SshMessageFactoryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
using Renci.SshNet.Messages.Authentication;
using Renci.SshNet.Messages.Connection;
using Renci.SshNet.Messages.Transport;
#if SILVERLIGHT
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif

namespace Renci.SshNet.Tests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@

using Moq;

#if !FEATURE_EVENTWAITHANDLE_DISPOSE
using Renci.SshNet.Common;
#endif // !FEATURE_EVENTWAITHANDLE_DISPOSE
using Renci.SshNet.Sftp;

using BufferedRead = Renci.SshNet.Sftp.SftpFileReader.BufferedRead;
Expand Down