diff --git a/AdvancedSharpAdbClient.Tests/AdbClientTests.Async.cs b/AdvancedSharpAdbClient.Tests/AdbClientTests.Async.cs index b7cc2aae..a21db936 100644 --- a/AdvancedSharpAdbClient.Tests/AdbClientTests.Async.cs +++ b/AdvancedSharpAdbClient.Tests/AdbClientTests.Async.cs @@ -1,6 +1,4 @@ -using AdvancedSharpAdbClient.Exceptions; -using AdvancedSharpAdbClient.Logs; -using System; +using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; diff --git a/AdvancedSharpAdbClient.Tests/AdbClientTests.cs b/AdvancedSharpAdbClient.Tests/AdbClientTests.cs index 01bc606f..644b2197 100644 --- a/AdvancedSharpAdbClient.Tests/AdbClientTests.cs +++ b/AdvancedSharpAdbClient.Tests/AdbClientTests.cs @@ -1,6 +1,4 @@ -using AdvancedSharpAdbClient.Exceptions; -using AdvancedSharpAdbClient.Logs; -using System; +using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; diff --git a/AdvancedSharpAdbClient.Tests/AdbCommandLineClientTests.Async.cs b/AdvancedSharpAdbClient.Tests/AdbCommandLineClientTests.Async.cs index 29a55dec..06629c38 100644 --- a/AdvancedSharpAdbClient.Tests/AdbCommandLineClientTests.Async.cs +++ b/AdvancedSharpAdbClient.Tests/AdbCommandLineClientTests.Async.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Exceptions; -using System; +using System; using Xunit; namespace AdvancedSharpAdbClient.Tests diff --git a/AdvancedSharpAdbClient.Tests/AdbCommandLineClientTests.cs b/AdvancedSharpAdbClient.Tests/AdbCommandLineClientTests.cs index 532f06ea..00d8358c 100644 --- a/AdvancedSharpAdbClient.Tests/AdbCommandLineClientTests.cs +++ b/AdvancedSharpAdbClient.Tests/AdbCommandLineClientTests.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Exceptions; -using System; +using System; using Xunit; namespace AdvancedSharpAdbClient.Tests diff --git a/AdvancedSharpAdbClient.Tests/AdbServerTests.Async.cs b/AdvancedSharpAdbClient.Tests/AdbServerTests.Async.cs index c4c60d0b..4f253a5c 100644 --- a/AdvancedSharpAdbClient.Tests/AdbServerTests.Async.cs +++ b/AdvancedSharpAdbClient.Tests/AdbServerTests.Async.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Exceptions; -using NSubstitute; +using NSubstitute; using NSubstitute.ExceptionExtensions; using System; using System.Net.Sockets; diff --git a/AdvancedSharpAdbClient.Tests/AdbServerTests.cs b/AdvancedSharpAdbClient.Tests/AdbServerTests.cs index ddb218de..6a6fa61d 100644 --- a/AdvancedSharpAdbClient.Tests/AdbServerTests.cs +++ b/AdvancedSharpAdbClient.Tests/AdbServerTests.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Exceptions; -using NSubstitute; +using NSubstitute; using System; using System.Net; using System.Net.Sockets; diff --git a/AdvancedSharpAdbClient.Tests/AdbSocketTests.Async.cs b/AdvancedSharpAdbClient.Tests/AdbSocketTests.Async.cs index 7c27e58d..8d2a6697 100644 --- a/AdvancedSharpAdbClient.Tests/AdbSocketTests.Async.cs +++ b/AdvancedSharpAdbClient.Tests/AdbSocketTests.Async.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Exceptions; -using System; +using System; using System.IO; using System.Text; using System.Threading; diff --git a/AdvancedSharpAdbClient.Tests/AdbSocketTests.cs b/AdvancedSharpAdbClient.Tests/AdbSocketTests.cs index 54c47c13..b98f2ec4 100644 --- a/AdvancedSharpAdbClient.Tests/AdbSocketTests.cs +++ b/AdvancedSharpAdbClient.Tests/AdbSocketTests.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Exceptions; -using System; +using System; using System.IO; using System.Text; using Xunit; diff --git a/AdvancedSharpAdbClient.Tests/AdvancedSharpAdbClient.Tests.csproj b/AdvancedSharpAdbClient.Tests/AdvancedSharpAdbClient.Tests.csproj index 3aacef3a..3ac4d63b 100644 --- a/AdvancedSharpAdbClient.Tests/AdvancedSharpAdbClient.Tests.csproj +++ b/AdvancedSharpAdbClient.Tests/AdvancedSharpAdbClient.Tests.csproj @@ -24,55 +24,7 @@ - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - + PreserveNewest diff --git a/AdvancedSharpAdbClient.Tests/DeviceCommands/DeviceExtensionsTests.Async.cs b/AdvancedSharpAdbClient.Tests/DeviceCommands/DeviceExtensionsTests.Async.cs index db7567f4..60b4c63e 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceCommands/DeviceExtensionsTests.Async.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceCommands/DeviceExtensionsTests.Async.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Tests; -using NSubstitute; +using NSubstitute; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AdvancedSharpAdbClient.Tests/DeviceCommands/DeviceExtensionsTests.cs b/AdvancedSharpAdbClient.Tests/DeviceCommands/DeviceExtensionsTests.cs index d82c9360..29b923f6 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceCommands/DeviceExtensionsTests.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceCommands/DeviceExtensionsTests.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Tests; -using NSubstitute; +using NSubstitute; using System.Collections.Generic; using System.Linq; using Xunit; diff --git a/AdvancedSharpAdbClient.Tests/DeviceCommands/Models/AndroidProcessTests.cs b/AdvancedSharpAdbClient.Tests/DeviceCommands/Models/AndroidProcessTests.cs index 5749e36a..99b8e753 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceCommands/Models/AndroidProcessTests.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceCommands/Models/AndroidProcessTests.cs @@ -7,7 +7,7 @@ using System; using Xunit; -namespace AdvancedSharpAdbClient.DeviceCommands.Tests +namespace AdvancedSharpAdbClient.Models.DeviceCommands.Tests { /// /// Tests the class. diff --git a/AdvancedSharpAdbClient.Tests/DeviceCommands/Models/VersionInfoTests.cs b/AdvancedSharpAdbClient.Tests/DeviceCommands/Models/VersionInfoTests.cs index cbf51678..3d93c4fa 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceCommands/Models/VersionInfoTests.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceCommands/Models/VersionInfoTests.cs @@ -1,6 +1,6 @@ using Xunit; -namespace AdvancedSharpAdbClient.DeviceCommands.Tests +namespace AdvancedSharpAdbClient.Models.DeviceCommands.Tests { /// /// Tests the class. diff --git a/AdvancedSharpAdbClient.Tests/DeviceCommands/PackageManagerTests.Async.cs b/AdvancedSharpAdbClient.Tests/DeviceCommands/PackageManagerTests.Async.cs index 91f1564f..687129cd 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceCommands/PackageManagerTests.Async.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceCommands/PackageManagerTests.Async.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Tests; -using System.IO; +using System.IO; using Xunit; namespace AdvancedSharpAdbClient.DeviceCommands.Tests diff --git a/AdvancedSharpAdbClient.Tests/DeviceCommands/PackageManagerTests.cs b/AdvancedSharpAdbClient.Tests/DeviceCommands/PackageManagerTests.cs index 7681f415..326c6111 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceCommands/PackageManagerTests.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceCommands/PackageManagerTests.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Tests; -using NSubstitute; +using NSubstitute; using System; using System.IO; using Xunit; diff --git a/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/EnvironmentVariablesReceiverTests.cs b/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/EnvironmentVariablesReceiverTests.cs index f37383d1..88bd4b29 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/EnvironmentVariablesReceiverTests.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/EnvironmentVariablesReceiverTests.cs @@ -1,6 +1,6 @@ using Xunit; -namespace AdvancedSharpAdbClient.DeviceCommands.Tests +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands.Tests { /// /// Tests the class. diff --git a/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/GetPropReceiverTests.cs b/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/GetPropReceiverTests.cs index 7600e3eb..da7f71b9 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/GetPropReceiverTests.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/GetPropReceiverTests.cs @@ -1,8 +1,7 @@ -using AdvancedSharpAdbClient.Tests; -using System.Collections.Generic; +using System.Collections.Generic; using Xunit; -namespace AdvancedSharpAdbClient.DeviceCommands.Tests +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands.Tests { public class GetPropReceiverTests { diff --git a/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/InstallOutputReceiverTests.cs b/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/InstallOutputReceiverTests.cs index e615b048..a0871234 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/InstallOutputReceiverTests.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/InstallOutputReceiverTests.cs @@ -1,6 +1,6 @@ using Xunit; -namespace AdvancedSharpAdbClient.DeviceCommands.Tests +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands.Tests { public class InstallOutputReceiverTests { diff --git a/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/PackageManagerReceiverTests.cs b/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/PackageManagerReceiverTests.cs index 3473a896..58023d12 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/PackageManagerReceiverTests.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/PackageManagerReceiverTests.cs @@ -1,7 +1,6 @@ -using AdvancedSharpAdbClient.Tests; -using Xunit; +using Xunit; -namespace AdvancedSharpAdbClient.DeviceCommands.Tests +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands.Tests { public class PackageManagerReceiverTests { diff --git a/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/ProcessOutputReceiverTests.cs b/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/ProcessOutputReceiverTests.cs index 78c82b4c..80fb796d 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/ProcessOutputReceiverTests.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/ProcessOutputReceiverTests.cs @@ -1,6 +1,6 @@ using Xunit; -namespace AdvancedSharpAdbClient.DeviceCommands.Tests +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands.Tests { /// /// Tests the class. diff --git a/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/VersionInfoReceiverTests.cs b/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/VersionInfoReceiverTests.cs index 630ee6f4..879856d1 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/VersionInfoReceiverTests.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceCommands/Receivers/VersionInfoReceiverTests.cs @@ -8,7 +8,7 @@ using System.IO; using Xunit; -namespace AdvancedSharpAdbClient.DeviceCommands.Tests +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands.Tests { /// /// Tests the class. @@ -31,11 +31,11 @@ public void GetVersionTest() Assert.Null(receiver.GetVersionCode(string.Empty)); Assert.Null(receiver.GetVersionCode(" versionCode=10210targetSdk=18")); - Assert.Equal("4.7.1", (string)receiver.GetVersionName(" versionName=4.7.1")); - Assert.Null((string)receiver.GetVersionName(null)); - Assert.Null((string)receiver.GetVersionName(" test")); - Assert.Null((string)receiver.GetVersionName(" versionName")); - Assert.Equal(string.Empty, (string)receiver.GetVersionName(" versionName=")); + Assert.Equal("4.7.1", receiver.GetVersionName(" versionName=4.7.1")); + Assert.Null(receiver.GetVersionName(null)); + Assert.Null(receiver.GetVersionName(" test")); + Assert.Null(receiver.GetVersionName(" versionName")); + Assert.Equal(string.Empty, receiver.GetVersionName(" versionName=")); string dumpsys = string.Join(Environment.NewLine, File.ReadAllLines(@"Assets/dumpsys_package.txt")); receiver = new VersionInfoReceiver(); diff --git a/AdvancedSharpAdbClient.Tests/DeviceMonitorTests.cs b/AdvancedSharpAdbClient.Tests/DeviceMonitorTests.cs index 972eba33..42ec5a56 100644 --- a/AdvancedSharpAdbClient.Tests/DeviceMonitorTests.cs +++ b/AdvancedSharpAdbClient.Tests/DeviceMonitorTests.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Logs; -using System; +using System; using System.Linq; using System.Threading; using Xunit; diff --git a/AdvancedSharpAdbClient.Tests/Dummys/DummyAdbClient.cs b/AdvancedSharpAdbClient.Tests/Dummys/DummyAdbClient.cs index c9e31e10..04344201 100644 --- a/AdvancedSharpAdbClient.Tests/Dummys/DummyAdbClient.cs +++ b/AdvancedSharpAdbClient.Tests/Dummys/DummyAdbClient.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Logs; -using System; +using System; using System.Collections.Generic; using System.Drawing; using System.IO; diff --git a/AdvancedSharpAdbClient.Tests/Dummys/DummyAdbSocket.cs b/AdvancedSharpAdbClient.Tests/Dummys/DummyAdbSocket.cs index 168af890..fb8dada9 100644 --- a/AdvancedSharpAdbClient.Tests/Dummys/DummyAdbSocket.cs +++ b/AdvancedSharpAdbClient.Tests/Dummys/DummyAdbSocket.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Exceptions; -using System; +using System; using System.Collections.Generic; using System.IO; using System.Net.Sockets; diff --git a/AdvancedSharpAdbClient.Tests/Dummys/TracingAdbSocket.cs b/AdvancedSharpAdbClient.Tests/Dummys/TracingAdbSocket.cs index 8742595b..595ac507 100644 --- a/AdvancedSharpAdbClient.Tests/Dummys/TracingAdbSocket.cs +++ b/AdvancedSharpAdbClient.Tests/Dummys/TracingAdbSocket.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Exceptions; -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; diff --git a/AdvancedSharpAdbClient.Tests/Extensions/DateTimeExtensionTests.cs b/AdvancedSharpAdbClient.Tests/Extensions/DateTimeExtensionsTests.cs similarity index 94% rename from AdvancedSharpAdbClient.Tests/Extensions/DateTimeExtensionTests.cs rename to AdvancedSharpAdbClient.Tests/Extensions/DateTimeExtensionsTests.cs index 9e7d5923..e74c7fc2 100644 --- a/AdvancedSharpAdbClient.Tests/Extensions/DateTimeExtensionTests.cs +++ b/AdvancedSharpAdbClient.Tests/Extensions/DateTimeExtensionsTests.cs @@ -1,12 +1,12 @@ using System; using Xunit; -namespace AdvancedSharpAdbClient.Tests +namespace AdvancedSharpAdbClient.Polyfills.Tests { /// /// Tests the class. /// - public class DateTimeExtensionTests + public class DateTimeExtensionsTests { /// /// Tests the method. diff --git a/AdvancedSharpAdbClient.Tests/Extensions/EnumerableExtensionsTests.cs b/AdvancedSharpAdbClient.Tests/Extensions/EnumerableExtensionsTests.cs new file mode 100644 index 00000000..86068dfe --- /dev/null +++ b/AdvancedSharpAdbClient.Tests/Extensions/EnumerableExtensionsTests.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using System.Collections.ObjectModel; +using Xunit; + +namespace AdvancedSharpAdbClient.Polyfills.Tests +{ + /// + /// Tests the class. + /// + public class EnumerableExtensionsTests + { + /// + /// Tests the method. + /// + [Fact] + public void AddRangeTest() + { + int[] numbs = [6, 7, 8, 9, 10]; + + List list = [1, 2, 3, 4, 5]; + list.AddRange(numbs); + Assert.Equal(10, list.Count); + Assert.Equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], list); + + HashSet hashSet = [1, 2, 3, 4, 5]; + hashSet.AddRange(numbs); + Assert.Equal(10, hashSet.Count); + Assert.Equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], hashSet); + + Collection collection = [1, 2, 3, 4, 5]; + collection.AddRange(numbs); + Assert.Equal(10, collection.Count); + Assert.Equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], collection); + } + } +} diff --git a/AdvancedSharpAdbClient.Tests/Extensions/ExceptionExtensionsTests.cs b/AdvancedSharpAdbClient.Tests/Extensions/ExceptionExtensionsTests.cs index 8de7a169..4aa180e5 100644 --- a/AdvancedSharpAdbClient.Tests/Extensions/ExceptionExtensionsTests.cs +++ b/AdvancedSharpAdbClient.Tests/Extensions/ExceptionExtensionsTests.cs @@ -1,7 +1,7 @@ using System; using Xunit; -namespace AdvancedSharpAdbClient.Tests +namespace AdvancedSharpAdbClient.Polyfills.Tests { /// /// Tests the class. diff --git a/AdvancedSharpAdbClient.Tests/Extensions/ExtensionsTests.cs b/AdvancedSharpAdbClient.Tests/Extensions/ExtensionsTests.cs index a1442504..cc86cdfc 100644 --- a/AdvancedSharpAdbClient.Tests/Extensions/ExtensionsTests.cs +++ b/AdvancedSharpAdbClient.Tests/Extensions/ExtensionsTests.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Linq; using System.Threading.Tasks; using Xunit; @@ -11,30 +10,6 @@ namespace AdvancedSharpAdbClient.Tests /// public class ExtensionsTests { - /// - /// Tests the method. - /// - [Fact] - public void AddRangeTest() - { - int[] numbs = [6, 7, 8, 9, 10]; - - List list = [1, 2, 3, 4, 5]; - list.AddRange(numbs); - Assert.Equal(10, list.Count); - Assert.Equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], list); - - HashSet hashSet = [1, 2, 3, 4, 5]; - hashSet.AddRange(numbs); - Assert.Equal(10, hashSet.Count); - Assert.Equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], hashSet); - - Collection collection = [1, 2, 3, 4, 5]; - collection.AddRange(numbs); - Assert.Equal(10, collection.Count); - Assert.Equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], collection); - } - [Fact] public async void TaskToArrayTest() { diff --git a/AdvancedSharpAdbClient.Tests/Models/AdbResponseTests.cs b/AdvancedSharpAdbClient.Tests/Models/AdbResponseTests.cs index 7443b278..e896cc6b 100644 --- a/AdvancedSharpAdbClient.Tests/Models/AdbResponseTests.cs +++ b/AdvancedSharpAdbClient.Tests/Models/AdbResponseTests.cs @@ -1,6 +1,6 @@ using Xunit; -namespace AdvancedSharpAdbClient.Tests +namespace AdvancedSharpAdbClient.Models.Tests { /// /// Tests the class. diff --git a/AdvancedSharpAdbClient.Tests/Models/AdbServerStatusTests.cs b/AdvancedSharpAdbClient.Tests/Models/AdbServerStatusTests.cs index bd9f8f7c..624ee170 100644 --- a/AdvancedSharpAdbClient.Tests/Models/AdbServerStatusTests.cs +++ b/AdvancedSharpAdbClient.Tests/Models/AdbServerStatusTests.cs @@ -1,7 +1,7 @@ using System; using Xunit; -namespace AdvancedSharpAdbClient.Tests +namespace AdvancedSharpAdbClient.Models.Tests { /// /// Tests the class. diff --git a/AdvancedSharpAdbClient.Tests/Models/DeviceDataTests.cs b/AdvancedSharpAdbClient.Tests/Models/DeviceDataTests.cs index 6b413da8..cf001fa1 100644 --- a/AdvancedSharpAdbClient.Tests/Models/DeviceDataTests.cs +++ b/AdvancedSharpAdbClient.Tests/Models/DeviceDataTests.cs @@ -1,7 +1,7 @@ using System; using Xunit; -namespace AdvancedSharpAdbClient.Tests +namespace AdvancedSharpAdbClient.Models.Tests { /// /// Tests the class. diff --git a/AdvancedSharpAdbClient.Tests/Models/ForwardDataTests.cs b/AdvancedSharpAdbClient.Tests/Models/ForwardDataTests.cs index ae75dcf9..30958db1 100644 --- a/AdvancedSharpAdbClient.Tests/Models/ForwardDataTests.cs +++ b/AdvancedSharpAdbClient.Tests/Models/ForwardDataTests.cs @@ -1,6 +1,6 @@ using Xunit; -namespace AdvancedSharpAdbClient.Tests +namespace AdvancedSharpAdbClient.Models.Tests { /// /// Tests the class. diff --git a/AdvancedSharpAdbClient.Tests/Models/ForwardSpecTests.cs b/AdvancedSharpAdbClient.Tests/Models/ForwardSpecTests.cs index b3659a74..276729b2 100644 --- a/AdvancedSharpAdbClient.Tests/Models/ForwardSpecTests.cs +++ b/AdvancedSharpAdbClient.Tests/Models/ForwardSpecTests.cs @@ -1,7 +1,7 @@ using System; using Xunit; -namespace AdvancedSharpAdbClient.Tests +namespace AdvancedSharpAdbClient.Models.Tests { /// /// Tests the class. diff --git a/AdvancedSharpAdbClient.Tests/Models/FramebufferHeaderTests.cs b/AdvancedSharpAdbClient.Tests/Models/FramebufferHeaderTests.cs index 4373c24e..39c5f027 100644 --- a/AdvancedSharpAdbClient.Tests/Models/FramebufferHeaderTests.cs +++ b/AdvancedSharpAdbClient.Tests/Models/FramebufferHeaderTests.cs @@ -4,7 +4,7 @@ using System.Runtime.Versioning; using Xunit; -namespace AdvancedSharpAdbClient.Tests +namespace AdvancedSharpAdbClient.Models.Tests { /// /// Tests the struct. diff --git a/AdvancedSharpAdbClient.Tests/Models/FramebufferTests.cs b/AdvancedSharpAdbClient.Tests/Models/FramebufferTests.cs index b113192b..1c90c8f8 100644 --- a/AdvancedSharpAdbClient.Tests/Models/FramebufferTests.cs +++ b/AdvancedSharpAdbClient.Tests/Models/FramebufferTests.cs @@ -5,7 +5,7 @@ using System.Net; using Xunit; -namespace AdvancedSharpAdbClient.Tests.Models +namespace AdvancedSharpAdbClient.Models.Tests { /// /// Tests the class. diff --git a/AdvancedSharpAdbClient.Tests/Models/ShellStreamTests.cs b/AdvancedSharpAdbClient.Tests/Models/ShellStreamTests.cs index 0afc4938..112bc28f 100644 --- a/AdvancedSharpAdbClient.Tests/Models/ShellStreamTests.cs +++ b/AdvancedSharpAdbClient.Tests/Models/ShellStreamTests.cs @@ -3,7 +3,7 @@ using System.Text; using Xunit; -namespace AdvancedSharpAdbClient.Tests +namespace AdvancedSharpAdbClient.Models.Tests { public class ShellStreamTests { diff --git a/AdvancedSharpAdbClient.Tests/Properties/GlobalUsings.cs b/AdvancedSharpAdbClient.Tests/Properties/GlobalUsings.cs new file mode 100644 index 00000000..bf4ebe71 --- /dev/null +++ b/AdvancedSharpAdbClient.Tests/Properties/GlobalUsings.cs @@ -0,0 +1,14 @@ +#region AdvancedSharpAdbClient +global using AdvancedSharpAdbClient.DeviceCommands; +global using AdvancedSharpAdbClient.Exceptions; +global using AdvancedSharpAdbClient.Logs; +global using AdvancedSharpAdbClient.Models; +global using AdvancedSharpAdbClient.Models.DeviceCommands; +global using AdvancedSharpAdbClient.Polyfills; +global using AdvancedSharpAdbClient.Receivers; +global using AdvancedSharpAdbClient.Receivers.DeviceCommands; +#endregion + +#region AdvancedSharpAdbClient.Tests +global using AdvancedSharpAdbClient.Tests; +#endregion \ No newline at end of file diff --git a/AdvancedSharpAdbClient.Tests/Receivers/ConsoleOutputReceiverTests.cs b/AdvancedSharpAdbClient.Tests/Receivers/ConsoleOutputReceiverTests.cs index a7e804de..46da400c 100644 --- a/AdvancedSharpAdbClient.Tests/Receivers/ConsoleOutputReceiverTests.cs +++ b/AdvancedSharpAdbClient.Tests/Receivers/ConsoleOutputReceiverTests.cs @@ -1,9 +1,8 @@ -using AdvancedSharpAdbClient.Exceptions; -using System; +using System; using System.IO; using Xunit; -namespace AdvancedSharpAdbClient.Tests +namespace AdvancedSharpAdbClient.Receivers.Tests { /// /// Tests the class. diff --git a/AdvancedSharpAdbClient.Tests/SocketBasedTests.cs b/AdvancedSharpAdbClient.Tests/SocketBasedTests.cs index f92622a1..c57f01fb 100644 --- a/AdvancedSharpAdbClient.Tests/SocketBasedTests.cs +++ b/AdvancedSharpAdbClient.Tests/SocketBasedTests.cs @@ -1,5 +1,4 @@ -using AdvancedSharpAdbClient.Tests; -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/AdvancedSharpAdbClient/AdbClient.Async.cs b/AdvancedSharpAdbClient/AdbClient.Async.cs index 4efdd51a..e358902c 100644 --- a/AdvancedSharpAdbClient/AdbClient.Async.cs +++ b/AdvancedSharpAdbClient/AdbClient.Async.cs @@ -3,8 +3,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; -using AdvancedSharpAdbClient.Logs; using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/AdvancedSharpAdbClient/AdbClient.cs b/AdvancedSharpAdbClient/AdbClient.cs index 8a7dca93..9efd2b22 100644 --- a/AdvancedSharpAdbClient/AdbClient.cs +++ b/AdvancedSharpAdbClient/AdbClient.cs @@ -2,10 +2,9 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; -using AdvancedSharpAdbClient.Logs; using System; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; @@ -1152,6 +1151,7 @@ protected static void EnsureDevice(DeviceData device) /// See as the class. /// [Obsolete("AdvancedAdbClient is too long to remember. Please use AdbClient instead.")] + [EditorBrowsable(EditorBrowsableState.Never)] public class AdvancedAdbClient : AdbClient { } diff --git a/AdvancedSharpAdbClient/AdbCommandLineClient.Async.cs b/AdvancedSharpAdbClient/AdbCommandLineClient.Async.cs index 685062d0..1b117ef9 100644 --- a/AdvancedSharpAdbClient/AdbCommandLineClient.Async.cs +++ b/AdvancedSharpAdbClient/AdbCommandLineClient.Async.cs @@ -3,7 +3,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System; using System.Collections.Generic; using System.ComponentModel; diff --git a/AdvancedSharpAdbClient/AdbCommandLineClient.cs b/AdvancedSharpAdbClient/AdbCommandLineClient.cs index c7b0bde4..504100e1 100644 --- a/AdvancedSharpAdbClient/AdbCommandLineClient.cs +++ b/AdvancedSharpAdbClient/AdbCommandLineClient.cs @@ -2,8 +2,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; -using AdvancedSharpAdbClient.Logs; using System; using System.Collections.Generic; using System.ComponentModel; diff --git a/AdvancedSharpAdbClient/AdbServer.Async.cs b/AdvancedSharpAdbClient/AdbServer.Async.cs index 3c5a314a..bfbf35bd 100644 --- a/AdvancedSharpAdbClient/AdbServer.Async.cs +++ b/AdvancedSharpAdbClient/AdbServer.Async.cs @@ -3,7 +3,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System; using System.Globalization; using System.Net.Sockets; diff --git a/AdvancedSharpAdbClient/AdbServer.cs b/AdvancedSharpAdbClient/AdbServer.cs index 95032d93..1ac66757 100644 --- a/AdvancedSharpAdbClient/AdbServer.cs +++ b/AdvancedSharpAdbClient/AdbServer.cs @@ -2,7 +2,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System; using System.Globalization; using System.Net; diff --git a/AdvancedSharpAdbClient/AdbSocket.Async.cs b/AdvancedSharpAdbClient/AdbSocket.Async.cs index 46414c31..b28c484e 100644 --- a/AdvancedSharpAdbClient/AdbSocket.Async.cs +++ b/AdvancedSharpAdbClient/AdbSocket.Async.cs @@ -3,7 +3,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System; using System.Globalization; using System.IO; diff --git a/AdvancedSharpAdbClient/AdbSocket.cs b/AdvancedSharpAdbClient/AdbSocket.cs index c9bb1fd2..9b2136ba 100644 --- a/AdvancedSharpAdbClient/AdbSocket.cs +++ b/AdvancedSharpAdbClient/AdbSocket.cs @@ -2,8 +2,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; -using AdvancedSharpAdbClient.Logs; using System; using System.Globalization; using System.IO; diff --git a/AdvancedSharpAdbClient/AdvancedSharpAdbClient.csproj b/AdvancedSharpAdbClient/AdvancedSharpAdbClient.csproj index eec44c2b..9cf14c37 100644 --- a/AdvancedSharpAdbClient/AdvancedSharpAdbClient.csproj +++ b/AdvancedSharpAdbClient/AdvancedSharpAdbClient.csproj @@ -36,8 +36,7 @@ - + @@ -53,84 +52,39 @@ - + - + - + - + $(DefineConstants);HAS_TASK - + $(DefineConstants);HAS_IMAGING - + $(DefineConstants);HAS_FULLSTRING - + $(DefineConstants);HAS_RUNTIMEINFORMATION - + $(DefineConstants);HAS_BUFFERS;HAS_INDEXRANGE - + $(DefineConstants);HAS_PROCESS;HAS_DRAWING;HAS_SERIALIZATION diff --git a/AdvancedSharpAdbClient/DeviceCommands/Models/AndroidProcess.cs b/AdvancedSharpAdbClient/DeviceCommands/Models/AndroidProcess.cs index 14e0e1de..683dd4fd 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Models/AndroidProcess.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Models/AndroidProcess.cs @@ -4,7 +4,7 @@ using System; -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Models.DeviceCommands { /// /// Represents a process running on an Android device. diff --git a/AdvancedSharpAdbClient/DeviceCommands/Models/Enums/AndroidProcessState.cs b/AdvancedSharpAdbClient/DeviceCommands/Models/Enums/AndroidProcessState.cs index 7d5eaf50..5fefe092 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Models/Enums/AndroidProcessState.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Models/Enums/AndroidProcessState.cs @@ -2,7 +2,7 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Models.DeviceCommands { /// /// Represents the state of a process running on an Android device. diff --git a/AdvancedSharpAdbClient/DeviceCommands/Models/Enums/PackageInstallProgressState.cs b/AdvancedSharpAdbClient/DeviceCommands/Models/Enums/PackageInstallProgressState.cs index 9ac2ccf4..7834380d 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Models/Enums/PackageInstallProgressState.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Models/Enums/PackageInstallProgressState.cs @@ -2,7 +2,7 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Models.DeviceCommands { /// /// Represents the state of the installation. diff --git a/AdvancedSharpAdbClient/DeviceCommands/Models/Enums/PerProcessFlags.cs b/AdvancedSharpAdbClient/DeviceCommands/Models/Enums/PerProcessFlags.cs index 429321cc..474d2f08 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Models/Enums/PerProcessFlags.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Models/Enums/PerProcessFlags.cs @@ -4,7 +4,7 @@ using System; -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Models.DeviceCommands { /// /// Per process flags. diff --git a/AdvancedSharpAdbClient/DeviceCommands/Models/InstallProgressEventArgs.cs b/AdvancedSharpAdbClient/DeviceCommands/Models/InstallProgressEventArgs.cs index 002df30d..c4c533e3 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Models/InstallProgressEventArgs.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Models/InstallProgressEventArgs.cs @@ -4,7 +4,7 @@ using System; -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Models.DeviceCommands { /// /// Represents the state of the installation for . diff --git a/AdvancedSharpAdbClient/DeviceCommands/Models/NamespaceDoc.cs b/AdvancedSharpAdbClient/DeviceCommands/Models/NamespaceDoc.cs new file mode 100644 index 00000000..91d43186 --- /dev/null +++ b/AdvancedSharpAdbClient/DeviceCommands/Models/NamespaceDoc.cs @@ -0,0 +1,17 @@ +// +// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. +// + +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace AdvancedSharpAdbClient.Models.DeviceCommands +{ + /// + /// The classes in this namespace provide models for . + /// + /// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. + [CompilerGenerated] + [EditorBrowsable(EditorBrowsableState.Never)] + internal class NamespaceDoc : Models.NamespaceDoc { } +} diff --git a/AdvancedSharpAdbClient/DeviceCommands/Models/VersionInfo.cs b/AdvancedSharpAdbClient/DeviceCommands/Models/VersionInfo.cs index 34bce4d9..a52af84b 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Models/VersionInfo.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Models/VersionInfo.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Models.DeviceCommands { /// /// Represents a version of an Android application. diff --git a/AdvancedSharpAdbClient/DeviceCommands/NamespaceDoc.cs b/AdvancedSharpAdbClient/DeviceCommands/NamespaceDoc.cs index 4a19a9c9..e29ebbdb 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/NamespaceDoc.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/NamespaceDoc.cs @@ -2,6 +2,7 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // +using System.ComponentModel; using System.Runtime.CompilerServices; namespace AdvancedSharpAdbClient.DeviceCommands @@ -11,5 +12,6 @@ namespace AdvancedSharpAdbClient.DeviceCommands /// /// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. [CompilerGenerated] - internal class NamespaceDoc { } + [EditorBrowsable(EditorBrowsableState.Never)] + internal class NamespaceDoc : AdvancedSharpAdbClient.NamespaceDoc { } } diff --git a/AdvancedSharpAdbClient/DeviceCommands/PackageManager.Async.cs b/AdvancedSharpAdbClient/DeviceCommands/PackageManager.Async.cs index 71ac1bb0..04fb2a45 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/PackageManager.Async.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/PackageManager.Async.cs @@ -3,7 +3,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/AdvancedSharpAdbClient/DeviceCommands/PackageManager.cs b/AdvancedSharpAdbClient/DeviceCommands/PackageManager.cs index abf0ad0b..6e4373bf 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/PackageManager.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/PackageManager.cs @@ -2,8 +2,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; -using AdvancedSharpAdbClient.Logs; using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/AdvancedSharpAdbClient/DeviceCommands/Receivers/EnvironmentVariablesReceiver.cs b/AdvancedSharpAdbClient/DeviceCommands/Receivers/EnvironmentVariablesReceiver.cs index 009c5b0e..40d72da0 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Receivers/EnvironmentVariablesReceiver.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Receivers/EnvironmentVariablesReceiver.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands { /// /// Processes the output of the printenv command, which dumps all environment variables of an Android device. diff --git a/AdvancedSharpAdbClient/DeviceCommands/Receivers/GetPropReceiver.cs b/AdvancedSharpAdbClient/DeviceCommands/Receivers/GetPropReceiver.cs index 78399fb8..a7caf189 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Receivers/GetPropReceiver.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Receivers/GetPropReceiver.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands { /// /// Parses the output of the getprop command, which lists all properties of an Android device. diff --git a/AdvancedSharpAdbClient/DeviceCommands/Receivers/InfoOutputReceiver.cs b/AdvancedSharpAdbClient/DeviceCommands/Receivers/InfoOutputReceiver.cs index 008b9671..f99485af 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Receivers/InfoOutputReceiver.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Receivers/InfoOutputReceiver.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands { /// /// Processes command line output of a adb shell command. diff --git a/AdvancedSharpAdbClient/DeviceCommands/Receivers/InstallOutputReceiver.cs b/AdvancedSharpAdbClient/DeviceCommands/Receivers/InstallOutputReceiver.cs index b42dd25b..29e91c98 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Receivers/InstallOutputReceiver.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Receivers/InstallOutputReceiver.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands { /// /// Processes output of the pm install command. diff --git a/AdvancedSharpAdbClient/DeviceCommands/Receivers/NamespaceDoc.cs b/AdvancedSharpAdbClient/DeviceCommands/Receivers/NamespaceDoc.cs new file mode 100644 index 00000000..8c2de411 --- /dev/null +++ b/AdvancedSharpAdbClient/DeviceCommands/Receivers/NamespaceDoc.cs @@ -0,0 +1,17 @@ +// +// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. +// + +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands +{ + /// + /// The classes in this namespace provide receivers for . + /// + /// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. + [CompilerGenerated] + [EditorBrowsable(EditorBrowsableState.Never)] + internal class NamespaceDoc : Receivers.NamespaceDoc { } +} diff --git a/AdvancedSharpAdbClient/DeviceCommands/Receivers/PackageManagerReceiver.cs b/AdvancedSharpAdbClient/DeviceCommands/Receivers/PackageManagerReceiver.cs index 979bc1c7..9ea82c3b 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Receivers/PackageManagerReceiver.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Receivers/PackageManagerReceiver.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands { /// /// Parses the output of the various pm commands. diff --git a/AdvancedSharpAdbClient/DeviceCommands/Receivers/ProcessOutputReceiver.cs b/AdvancedSharpAdbClient/DeviceCommands/Receivers/ProcessOutputReceiver.cs index 9d4e2a47..bd76bbdb 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Receivers/ProcessOutputReceiver.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Receivers/ProcessOutputReceiver.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands { /// /// Parses the output of a cat /proc/[pid]/stat command. diff --git a/AdvancedSharpAdbClient/DeviceCommands/Receivers/VersionInfoReceiver.cs b/AdvancedSharpAdbClient/DeviceCommands/Receivers/VersionInfoReceiver.cs index 731bca84..c9d4d37c 100644 --- a/AdvancedSharpAdbClient/DeviceCommands/Receivers/VersionInfoReceiver.cs +++ b/AdvancedSharpAdbClient/DeviceCommands/Receivers/VersionInfoReceiver.cs @@ -5,7 +5,7 @@ using System; using System.Text.RegularExpressions; -namespace AdvancedSharpAdbClient.DeviceCommands +namespace AdvancedSharpAdbClient.Receivers.DeviceCommands { /// /// Processes command line output of the dumpsys package command. diff --git a/AdvancedSharpAdbClient/DeviceMonitor.Async.cs b/AdvancedSharpAdbClient/DeviceMonitor.Async.cs index c9bc84f4..56a2d3cd 100644 --- a/AdvancedSharpAdbClient/DeviceMonitor.Async.cs +++ b/AdvancedSharpAdbClient/DeviceMonitor.Async.cs @@ -3,7 +3,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System; using System.Diagnostics.CodeAnalysis; using System.Net.Sockets; diff --git a/AdvancedSharpAdbClient/DeviceMonitor.cs b/AdvancedSharpAdbClient/DeviceMonitor.cs index a982a45b..b9318815 100644 --- a/AdvancedSharpAdbClient/DeviceMonitor.cs +++ b/AdvancedSharpAdbClient/DeviceMonitor.cs @@ -2,8 +2,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; -using AdvancedSharpAdbClient.Logs; using System; using System.Collections.Generic; using System.Collections.ObjectModel; diff --git a/AdvancedSharpAdbClient/Exceptions/NamespaceDoc.cs b/AdvancedSharpAdbClient/Exceptions/NamespaceDoc.cs index dfa29824..bf3b8d99 100644 --- a/AdvancedSharpAdbClient/Exceptions/NamespaceDoc.cs +++ b/AdvancedSharpAdbClient/Exceptions/NamespaceDoc.cs @@ -3,6 +3,7 @@ // using System; +using System.ComponentModel; using System.Runtime.CompilerServices; namespace AdvancedSharpAdbClient.Exceptions @@ -12,5 +13,6 @@ namespace AdvancedSharpAdbClient.Exceptions /// /// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. [CompilerGenerated] - internal class NamespaceDoc { } + [EditorBrowsable(EditorBrowsableState.Never)] + internal class NamespaceDoc : AdvancedSharpAdbClient.NamespaceDoc { } } diff --git a/AdvancedSharpAdbClient/Extensions/AdbClientExtensions.Async.cs b/AdvancedSharpAdbClient/Extensions/AdbClientExtensions.Async.cs index 03decccc..1c81e7fc 100644 --- a/AdvancedSharpAdbClient/Extensions/AdbClientExtensions.Async.cs +++ b/AdvancedSharpAdbClient/Extensions/AdbClientExtensions.Async.cs @@ -3,8 +3,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; -using AdvancedSharpAdbClient.Logs; using System; using System.Collections.Generic; using System.IO; diff --git a/AdvancedSharpAdbClient/Extensions/AdbClientExtensions.cs b/AdvancedSharpAdbClient/Extensions/AdbClientExtensions.cs index f2d77896..41467308 100644 --- a/AdvancedSharpAdbClient/Extensions/AdbClientExtensions.cs +++ b/AdvancedSharpAdbClient/Extensions/AdbClientExtensions.cs @@ -2,7 +2,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System; using System.Linq; using System.Net; diff --git a/AdvancedSharpAdbClient/Extensions/Attributes/BrowsableAttribute.cs b/AdvancedSharpAdbClient/Extensions/Attributes/BrowsableAttribute.cs deleted file mode 100644 index e2959119..00000000 --- a/AdvancedSharpAdbClient/Extensions/Attributes/BrowsableAttribute.cs +++ /dev/null @@ -1,61 +0,0 @@ -#if NETSTANDARD && !NETSTANDARD2_0_OR_GREATER || NETCORE && !UAP10_0_15138_0 -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Diagnostics.CodeAnalysis; - -namespace System.ComponentModel -{ - /// - /// Specifies whether a property or event should be displayed in a property - /// browsing window. - /// - [AttributeUsage(AttributeTargets.All)] - internal sealed class BrowsableAttribute : Attribute - { - /// - /// Specifies that a property or event can be modified at design time. - /// This field is read-only. - /// - public static readonly BrowsableAttribute Yes = new(true); - - /// - /// Specifies that a property or event cannot be modified at design time.' - /// This field is read-only. - /// - public static readonly BrowsableAttribute No = new(false); - - /// - /// Specifies the default value for the , which is . - /// This field is read-only. - /// - public static readonly BrowsableAttribute Default = Yes; - - /// - /// Initializes a new instance of the class. - /// - public BrowsableAttribute(bool browsable) - { - Browsable = browsable; - } - - /// - /// Gets a value indicating whether an object is browsable. - /// - public bool Browsable { get; } - - /// - public override bool Equals([NotNullWhen(true)] object? obj) => - obj is BrowsableAttribute other && other.Browsable == Browsable; - - /// - public override int GetHashCode() => Browsable.GetHashCode(); - - /// - /// Determines if this attribute is the default. - /// - /// if the attribute is the default value for this attribute class; otherwise, . - public bool IsDefaultAttribute() => Equals(Default); - } -} -#endif \ No newline at end of file diff --git a/AdvancedSharpAdbClient/Extensions/Extensions.cs b/AdvancedSharpAdbClient/Extensions/Extensions.cs index 25b45854..3d373dbf 100644 --- a/AdvancedSharpAdbClient/Extensions/Extensions.cs +++ b/AdvancedSharpAdbClient/Extensions/Extensions.cs @@ -17,39 +17,6 @@ internal static class Extensions { public static char[] NewLineSeparator { get; } = ['\r', '\n']; - /// - /// Adds the elements of the specified collection to the end of the . - /// - /// The type of the elements of . - /// The to be added. - /// The collection whose elements should be added to the end of the . - /// The collection itself cannot be , but it can contain elements that are - /// , if type is a reference type. - /// or is null. - public static void AddRange(this ICollection source, IEnumerable collection) - { - ExceptionExtensions.ThrowIfNull(source); - ExceptionExtensions.ThrowIfNull(collection); - - if (source is List list) - { - list.AddRange(collection); - } -#if !NETFRAMEWORK || NET40_OR_GREATER - else if (source is ISet set) - { - set.UnionWith(collection); - } -#endif - else - { - foreach (TSource item in collection) - { - source.Add(item); - } - } - } - /// /// Creates a from the specified host and port information. /// diff --git a/AdvancedSharpAdbClient/Extensions/LoggerExtensions.cs b/AdvancedSharpAdbClient/Extensions/LoggerExtensions.cs index 6f7e31e4..14566e73 100644 --- a/AdvancedSharpAdbClient/Extensions/LoggerExtensions.cs +++ b/AdvancedSharpAdbClient/Extensions/LoggerExtensions.cs @@ -2,7 +2,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Logs; using System; namespace AdvancedSharpAdbClient diff --git a/AdvancedSharpAdbClient/Interfaces/IAdbClient.Async.cs b/AdvancedSharpAdbClient/Interfaces/IAdbClient.Async.cs index bb3e8f7a..5e6e5440 100644 --- a/AdvancedSharpAdbClient/Interfaces/IAdbClient.Async.cs +++ b/AdvancedSharpAdbClient/Interfaces/IAdbClient.Async.cs @@ -3,8 +3,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; -using AdvancedSharpAdbClient.Logs; using System; using System.Collections.Generic; using System.IO; diff --git a/AdvancedSharpAdbClient/Interfaces/IAdbClient.cs b/AdvancedSharpAdbClient/Interfaces/IAdbClient.cs index 12b48fe4..9fafa91b 100644 --- a/AdvancedSharpAdbClient/Interfaces/IAdbClient.cs +++ b/AdvancedSharpAdbClient/Interfaces/IAdbClient.cs @@ -2,8 +2,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; -using AdvancedSharpAdbClient.Logs; using System; using System.Collections.Generic; using System.IO; diff --git a/AdvancedSharpAdbClient/Interfaces/IAdbServer.Async.cs b/AdvancedSharpAdbClient/Interfaces/IAdbServer.Async.cs index abc63422..49fa3840 100644 --- a/AdvancedSharpAdbClient/Interfaces/IAdbServer.Async.cs +++ b/AdvancedSharpAdbClient/Interfaces/IAdbServer.Async.cs @@ -3,7 +3,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System.Threading; namespace AdvancedSharpAdbClient diff --git a/AdvancedSharpAdbClient/Interfaces/IAdbServer.cs b/AdvancedSharpAdbClient/Interfaces/IAdbServer.cs index 3e3ffe71..3ad593ae 100644 --- a/AdvancedSharpAdbClient/Interfaces/IAdbServer.cs +++ b/AdvancedSharpAdbClient/Interfaces/IAdbServer.cs @@ -2,8 +2,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; - namespace AdvancedSharpAdbClient { /// diff --git a/AdvancedSharpAdbClient/Interfaces/IAdbSocket.cs b/AdvancedSharpAdbClient/Interfaces/IAdbSocket.cs index c397b5f6..988ec151 100644 --- a/AdvancedSharpAdbClient/Interfaces/IAdbSocket.cs +++ b/AdvancedSharpAdbClient/Interfaces/IAdbSocket.cs @@ -2,7 +2,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System; using System.IO; using System.Net.Sockets; diff --git a/AdvancedSharpAdbClient/Logs/LogReader.Async.cs b/AdvancedSharpAdbClient/Logs/LogReader.Async.cs index 2124bce2..d95fb309 100644 --- a/AdvancedSharpAdbClient/Logs/LogReader.Async.cs +++ b/AdvancedSharpAdbClient/Logs/LogReader.Async.cs @@ -3,7 +3,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System; using System.IO; using System.Text; diff --git a/AdvancedSharpAdbClient/Logs/LogReader.cs b/AdvancedSharpAdbClient/Logs/LogReader.cs index 88dc0a00..b75fa581 100644 --- a/AdvancedSharpAdbClient/Logs/LogReader.cs +++ b/AdvancedSharpAdbClient/Logs/LogReader.cs @@ -2,7 +2,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System; using System.Collections.Generic; using System.IO; diff --git a/AdvancedSharpAdbClient/Logs/NamespaceDoc.cs b/AdvancedSharpAdbClient/Logs/NamespaceDoc.cs index 52b00fbf..10619948 100644 --- a/AdvancedSharpAdbClient/Logs/NamespaceDoc.cs +++ b/AdvancedSharpAdbClient/Logs/NamespaceDoc.cs @@ -2,6 +2,7 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // +using System.ComponentModel; using System.Runtime.CompilerServices; namespace AdvancedSharpAdbClient.Logs @@ -11,5 +12,6 @@ namespace AdvancedSharpAdbClient.Logs /// /// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. [CompilerGenerated] - internal class NamespaceDoc { } + [EditorBrowsable(EditorBrowsableState.Never)] + internal class NamespaceDoc : AdvancedSharpAdbClient.NamespaceDoc { } } diff --git a/AdvancedSharpAdbClient/Models/AdbResponse.cs b/AdvancedSharpAdbClient/Models/AdbResponse.cs index 91ebe18f..43975418 100644 --- a/AdvancedSharpAdbClient/Models/AdbResponse.cs +++ b/AdvancedSharpAdbClient/Models/AdbResponse.cs @@ -5,7 +5,7 @@ using System; using System.Diagnostics.CodeAnalysis; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// The response returned by ADB server. diff --git a/AdvancedSharpAdbClient/Models/AdbServerStatus.cs b/AdvancedSharpAdbClient/Models/AdbServerStatus.cs index e114e021..dbb2030b 100644 --- a/AdvancedSharpAdbClient/Models/AdbServerStatus.cs +++ b/AdvancedSharpAdbClient/Models/AdbServerStatus.cs @@ -4,7 +4,7 @@ using System; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Represents the status of the adb server. diff --git a/AdvancedSharpAdbClient/Models/ColorData.cs b/AdvancedSharpAdbClient/Models/ColorData.cs index 2938cc7c..8d8f4245 100644 --- a/AdvancedSharpAdbClient/Models/ColorData.cs +++ b/AdvancedSharpAdbClient/Models/ColorData.cs @@ -2,7 +2,7 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Contains information about a color element. Information about each pixel on the screen diff --git a/AdvancedSharpAdbClient/Models/DeviceData.cs b/AdvancedSharpAdbClient/Models/DeviceData.cs index fdd0bce2..931a9d37 100644 --- a/AdvancedSharpAdbClient/Models/DeviceData.cs +++ b/AdvancedSharpAdbClient/Models/DeviceData.cs @@ -6,7 +6,7 @@ using System.Diagnostics.CodeAnalysis; using System.Text.RegularExpressions; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Represents a device that is connected to the Android Debug Bridge. diff --git a/AdvancedSharpAdbClient/Models/DeviceDataEventArgs.cs b/AdvancedSharpAdbClient/Models/DeviceDataEventArgs.cs index 7ca8681f..9ae1c49e 100644 --- a/AdvancedSharpAdbClient/Models/DeviceDataEventArgs.cs +++ b/AdvancedSharpAdbClient/Models/DeviceDataEventArgs.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// The event arguments that are passed when a device event occurs. diff --git a/AdvancedSharpAdbClient/Models/Element.cs b/AdvancedSharpAdbClient/Models/Element.cs index 8e3399c7..fe1280f7 100644 --- a/AdvancedSharpAdbClient/Models/Element.cs +++ b/AdvancedSharpAdbClient/Models/Element.cs @@ -9,7 +9,7 @@ using System.Threading; using System.Xml; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Implement of screen element, likes Selenium. diff --git a/AdvancedSharpAdbClient/Models/Enums/AppStatus.cs b/AdvancedSharpAdbClient/Models/Enums/AppStatus.cs index f69dad38..280d5122 100644 --- a/AdvancedSharpAdbClient/Models/Enums/AppStatus.cs +++ b/AdvancedSharpAdbClient/Models/Enums/AppStatus.cs @@ -2,7 +2,7 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// The status of an application if it is stopped or running in foreground or background. diff --git a/AdvancedSharpAdbClient/Models/Enums/DeviceState.cs b/AdvancedSharpAdbClient/Models/Enums/DeviceState.cs index 2b44c453..d563ff6f 100644 --- a/AdvancedSharpAdbClient/Models/Enums/DeviceState.cs +++ b/AdvancedSharpAdbClient/Models/Enums/DeviceState.cs @@ -2,7 +2,7 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Defines the state of an Android device connected to the Android Debug Bridge. diff --git a/AdvancedSharpAdbClient/Models/Enums/ForwardProtocol.cs b/AdvancedSharpAdbClient/Models/Enums/ForwardProtocol.cs index 27cc2b00..e2ebd3af 100644 --- a/AdvancedSharpAdbClient/Models/Enums/ForwardProtocol.cs +++ b/AdvancedSharpAdbClient/Models/Enums/ForwardProtocol.cs @@ -2,7 +2,7 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Represents a protocol which is being forwarded over adb. diff --git a/AdvancedSharpAdbClient/Models/Enums/StartServerResult.cs b/AdvancedSharpAdbClient/Models/Enums/StartServerResult.cs index 75192dc0..1d4c2796 100644 --- a/AdvancedSharpAdbClient/Models/Enums/StartServerResult.cs +++ b/AdvancedSharpAdbClient/Models/Enums/StartServerResult.cs @@ -2,7 +2,7 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Gives information about a operation. diff --git a/AdvancedSharpAdbClient/Models/Enums/SyncCommand.cs b/AdvancedSharpAdbClient/Models/Enums/SyncCommand.cs index a5dc29bf..60188e2c 100644 --- a/AdvancedSharpAdbClient/Models/Enums/SyncCommand.cs +++ b/AdvancedSharpAdbClient/Models/Enums/SyncCommand.cs @@ -2,7 +2,7 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Defines a command that can be sent to, or a response that can be received from the sync service. diff --git a/AdvancedSharpAdbClient/Models/Enums/TransportType.cs b/AdvancedSharpAdbClient/Models/Enums/TransportType.cs index 283ae50e..113938ad 100644 --- a/AdvancedSharpAdbClient/Models/Enums/TransportType.cs +++ b/AdvancedSharpAdbClient/Models/Enums/TransportType.cs @@ -2,7 +2,7 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Specifies the transport type used between the device and the Android Debug Bridge server. diff --git a/AdvancedSharpAdbClient/Models/Enums/UnixFileType.cs b/AdvancedSharpAdbClient/Models/Enums/UnixFileType.cs index ec47bc17..05fecae9 100644 --- a/AdvancedSharpAdbClient/Models/Enums/UnixFileType.cs +++ b/AdvancedSharpAdbClient/Models/Enums/UnixFileType.cs @@ -4,7 +4,7 @@ using System; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Describes the properties of a file on an Android device. diff --git a/AdvancedSharpAdbClient/Models/FileStatistics.cs b/AdvancedSharpAdbClient/Models/FileStatistics.cs index be4a58eb..a567f963 100644 --- a/AdvancedSharpAdbClient/Models/FileStatistics.cs +++ b/AdvancedSharpAdbClient/Models/FileStatistics.cs @@ -5,7 +5,7 @@ using System; using System.Diagnostics.CodeAnalysis; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Contains information about a file on the remote device. diff --git a/AdvancedSharpAdbClient/Models/ForwardData.cs b/AdvancedSharpAdbClient/Models/ForwardData.cs index 238db1be..eb2e4093 100644 --- a/AdvancedSharpAdbClient/Models/ForwardData.cs +++ b/AdvancedSharpAdbClient/Models/ForwardData.cs @@ -5,7 +5,7 @@ using System; using System.Diagnostics.CodeAnalysis; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Contains information about port forwarding configured by the Android Debug Bridge. diff --git a/AdvancedSharpAdbClient/Models/ForwardSpec.cs b/AdvancedSharpAdbClient/Models/ForwardSpec.cs index 80839731..d44d8cbb 100644 --- a/AdvancedSharpAdbClient/Models/ForwardSpec.cs +++ b/AdvancedSharpAdbClient/Models/ForwardSpec.cs @@ -7,7 +7,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Represents an adb forward specification as used by the various adb port forwarding functions. diff --git a/AdvancedSharpAdbClient/Models/Framebuffer.cs b/AdvancedSharpAdbClient/Models/Framebuffer.cs index 2e7d557b..d0e32809 100644 --- a/AdvancedSharpAdbClient/Models/Framebuffer.cs +++ b/AdvancedSharpAdbClient/Models/Framebuffer.cs @@ -7,7 +7,7 @@ using System.Net; using System.Threading; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Provides access to the framebuffer (that is, a copy of the image being displayed on the device screen). diff --git a/AdvancedSharpAdbClient/Models/FramebufferHeader.cs b/AdvancedSharpAdbClient/Models/FramebufferHeader.cs index d664a1db..13bc553a 100644 --- a/AdvancedSharpAdbClient/Models/FramebufferHeader.cs +++ b/AdvancedSharpAdbClient/Models/FramebufferHeader.cs @@ -11,7 +11,7 @@ using System.Threading; #endif -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Whenever the framebuffer: service is invoked, the adb server responds with the contents diff --git a/AdvancedSharpAdbClient/Models/NamespaceDoc.cs b/AdvancedSharpAdbClient/Models/NamespaceDoc.cs new file mode 100644 index 00000000..a60004f7 --- /dev/null +++ b/AdvancedSharpAdbClient/Models/NamespaceDoc.cs @@ -0,0 +1,17 @@ +// +// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. +// + +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace AdvancedSharpAdbClient.Models +{ + /// + /// The classes in this namespace provide models for . + /// + /// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. + [CompilerGenerated] + [EditorBrowsable(EditorBrowsableState.Never)] + internal class NamespaceDoc : AdvancedSharpAdbClient.NamespaceDoc { } +} diff --git a/AdvancedSharpAdbClient/Models/ShellStream.cs b/AdvancedSharpAdbClient/Models/ShellStream.cs index 4d2a9ecd..e3a89064 100644 --- a/AdvancedSharpAdbClient/Models/ShellStream.cs +++ b/AdvancedSharpAdbClient/Models/ShellStream.cs @@ -7,7 +7,7 @@ using System.IO; using System.Threading; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// Represents a that wraps around an inner that contains /// output from an Android shell command. In the shell output, the LF character is replaced by a diff --git a/AdvancedSharpAdbClient/Models/SyncProgressChangedEventArgs.cs b/AdvancedSharpAdbClient/Models/SyncProgressChangedEventArgs.cs index d054258b..d869a58b 100644 --- a/AdvancedSharpAdbClient/Models/SyncProgressChangedEventArgs.cs +++ b/AdvancedSharpAdbClient/Models/SyncProgressChangedEventArgs.cs @@ -4,7 +4,7 @@ using System; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Models { /// /// Provides data for the event. diff --git a/AdvancedSharpAdbClient/NamespaceDoc.cs b/AdvancedSharpAdbClient/NamespaceDoc.cs index bd3aab03..3151bd5e 100644 --- a/AdvancedSharpAdbClient/NamespaceDoc.cs +++ b/AdvancedSharpAdbClient/NamespaceDoc.cs @@ -2,6 +2,7 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // +using System.ComponentModel; using System.Runtime.CompilerServices; namespace AdvancedSharpAdbClient @@ -56,5 +57,6 @@ namespace AdvancedSharpAdbClient /// /// [CompilerGenerated] + [EditorBrowsable(EditorBrowsableState.Never)] internal class NamespaceDoc { } } diff --git a/AdvancedSharpAdbClient/Extensions/Attributes/CallerArgumentExpressionAttribute.cs b/AdvancedSharpAdbClient/Polyfills/Attributes/CallerArgumentExpressionAttribute.cs similarity index 100% rename from AdvancedSharpAdbClient/Extensions/Attributes/CallerArgumentExpressionAttribute.cs rename to AdvancedSharpAdbClient/Polyfills/Attributes/CallerArgumentExpressionAttribute.cs diff --git a/AdvancedSharpAdbClient/Extensions/Attributes/ExcludeFromCodeCoverageAttribute.cs b/AdvancedSharpAdbClient/Polyfills/Attributes/ExcludeFromCodeCoverageAttribute.cs similarity index 100% rename from AdvancedSharpAdbClient/Extensions/Attributes/ExcludeFromCodeCoverageAttribute.cs rename to AdvancedSharpAdbClient/Polyfills/Attributes/ExcludeFromCodeCoverageAttribute.cs diff --git a/AdvancedSharpAdbClient/Extensions/Attributes/IsExternalInit.cs b/AdvancedSharpAdbClient/Polyfills/Attributes/IsExternalInit.cs similarity index 100% rename from AdvancedSharpAdbClient/Extensions/Attributes/IsExternalInit.cs rename to AdvancedSharpAdbClient/Polyfills/Attributes/IsExternalInit.cs diff --git a/AdvancedSharpAdbClient/Extensions/Attributes/NullableAttributes.cs b/AdvancedSharpAdbClient/Polyfills/Attributes/NullableAttributes.cs similarity index 100% rename from AdvancedSharpAdbClient/Extensions/Attributes/NullableAttributes.cs rename to AdvancedSharpAdbClient/Polyfills/Attributes/NullableAttributes.cs diff --git a/AdvancedSharpAdbClient/Extensions/Attributes/SerializableAttribute.cs b/AdvancedSharpAdbClient/Polyfills/Attributes/SerializableAttribute.cs similarity index 100% rename from AdvancedSharpAdbClient/Extensions/Attributes/SerializableAttribute.cs rename to AdvancedSharpAdbClient/Polyfills/Attributes/SerializableAttribute.cs diff --git a/AdvancedSharpAdbClient/Extensions/Attributes/StackTraceHiddenAttribute.cs b/AdvancedSharpAdbClient/Polyfills/Attributes/StackTraceHiddenAttribute.cs similarity index 100% rename from AdvancedSharpAdbClient/Extensions/Attributes/StackTraceHiddenAttribute.cs rename to AdvancedSharpAdbClient/Polyfills/Attributes/StackTraceHiddenAttribute.cs diff --git a/AdvancedSharpAdbClient/Models/DnsEndPoint.cs b/AdvancedSharpAdbClient/Polyfills/DnsEndPoint.cs similarity index 99% rename from AdvancedSharpAdbClient/Models/DnsEndPoint.cs rename to AdvancedSharpAdbClient/Polyfills/DnsEndPoint.cs index 583ad28e..295846e9 100644 --- a/AdvancedSharpAdbClient/Models/DnsEndPoint.cs +++ b/AdvancedSharpAdbClient/Polyfills/DnsEndPoint.cs @@ -4,7 +4,7 @@ using System.Net; using System.Net.Sockets; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Polyfills { /// /// Represents a network endpoint as a host name or a string representation of an IP address and a port number. diff --git a/AdvancedSharpAdbClient/Extensions/DateTimeExtensions.cs b/AdvancedSharpAdbClient/Polyfills/Extensions/DateTimeExtensions.cs similarity index 99% rename from AdvancedSharpAdbClient/Extensions/DateTimeExtensions.cs rename to AdvancedSharpAdbClient/Polyfills/Extensions/DateTimeExtensions.cs index bf2b2702..33e0d8a5 100644 --- a/AdvancedSharpAdbClient/Extensions/DateTimeExtensions.cs +++ b/AdvancedSharpAdbClient/Polyfills/Extensions/DateTimeExtensions.cs @@ -4,7 +4,7 @@ using System; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Polyfills { /// /// Provides helper methods for working with Unix-based date formats. diff --git a/AdvancedSharpAdbClient/Polyfills/Extensions/EnumerableExtensions.cs b/AdvancedSharpAdbClient/Polyfills/Extensions/EnumerableExtensions.cs new file mode 100644 index 00000000..7ff6a497 --- /dev/null +++ b/AdvancedSharpAdbClient/Polyfills/Extensions/EnumerableExtensions.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace AdvancedSharpAdbClient.Polyfills +{ + /// + /// Provides extension methods for the class. + /// + public static class EnumerableExtensions + { + /// + /// Adds the elements of the specified collection to the end of the . + /// + /// The type of the elements of . + /// The to be added. + /// The collection whose elements should be added to the end of the . + /// The collection itself cannot be , but it can contain elements that are + /// , if type is a reference type. + /// or is null. + public static void AddRange(this ICollection source, IEnumerable collection) + { + ExceptionExtensions.ThrowIfNull(source); + ExceptionExtensions.ThrowIfNull(collection); + + if (source is List list) + { + list.AddRange(collection); + } +#if !NETFRAMEWORK || NET40_OR_GREATER + else if (source is ISet set) + { + set.UnionWith(collection); + } +#endif + else + { + foreach (TSource item in collection) + { + source.Add(item); + } + } + } + } +} diff --git a/AdvancedSharpAdbClient/Extensions/ExceptionExtensions.cs b/AdvancedSharpAdbClient/Polyfills/Extensions/ExceptionExtensions.cs similarity index 93% rename from AdvancedSharpAdbClient/Extensions/ExceptionExtensions.cs rename to AdvancedSharpAdbClient/Polyfills/Extensions/ExceptionExtensions.cs index 3c8d55b0..7085e5c4 100644 --- a/AdvancedSharpAdbClient/Extensions/ExceptionExtensions.cs +++ b/AdvancedSharpAdbClient/Polyfills/Extensions/ExceptionExtensions.cs @@ -3,9 +3,12 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Polyfills { - internal static class ExceptionExtensions + /// + /// Provides extension methods for the class. + /// + public static class ExceptionExtensions { /// /// Throws an if is null. @@ -73,7 +76,7 @@ public static void ThrowIfNegative(T value, [CallerArgumentExpression(nameof( { ArgumentOutOfRangeException.ThrowIfNegative(value, paramName); #else - public static void ThrowIfNegative(int value, [CallerArgumentExpression(nameof(value))] string? paramName = null) + public static void ThrowIfNegative(double value, [CallerArgumentExpression(nameof(value))] string? paramName = null) { if (value < 0) { diff --git a/AdvancedSharpAdbClient/Extensions/SocketExtensions.cs b/AdvancedSharpAdbClient/Polyfills/Extensions/SocketExtensions.cs similarity index 99% rename from AdvancedSharpAdbClient/Extensions/SocketExtensions.cs rename to AdvancedSharpAdbClient/Polyfills/Extensions/SocketExtensions.cs index 76dce262..a7f2bed0 100644 --- a/AdvancedSharpAdbClient/Extensions/SocketExtensions.cs +++ b/AdvancedSharpAdbClient/Polyfills/Extensions/SocketExtensions.cs @@ -6,7 +6,7 @@ using System.Net.Sockets; using System.Threading; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Polyfills { /// /// Provides extension methods for the class. diff --git a/AdvancedSharpAdbClient/Extensions/StreamExtensions.cs b/AdvancedSharpAdbClient/Polyfills/Extensions/StreamExtensions.cs similarity index 99% rename from AdvancedSharpAdbClient/Extensions/StreamExtensions.cs rename to AdvancedSharpAdbClient/Polyfills/Extensions/StreamExtensions.cs index 1323bb96..6ffae039 100644 --- a/AdvancedSharpAdbClient/Extensions/StreamExtensions.cs +++ b/AdvancedSharpAdbClient/Polyfills/Extensions/StreamExtensions.cs @@ -6,7 +6,7 @@ using System.IO; using System.Threading; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Polyfills { /// /// Provides extension methods for the class. diff --git a/AdvancedSharpAdbClient/Extensions/StringExtensions.cs b/AdvancedSharpAdbClient/Polyfills/Extensions/StringExtensions.cs similarity index 99% rename from AdvancedSharpAdbClient/Extensions/StringExtensions.cs rename to AdvancedSharpAdbClient/Polyfills/Extensions/StringExtensions.cs index 1a67370e..7870641f 100644 --- a/AdvancedSharpAdbClient/Extensions/StringExtensions.cs +++ b/AdvancedSharpAdbClient/Polyfills/Extensions/StringExtensions.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Polyfills { /// /// Provides extension methods for the class. diff --git a/AdvancedSharpAdbClient/Extensions/ThreadExtensions.cs b/AdvancedSharpAdbClient/Polyfills/Extensions/ThreadExtensions.cs similarity index 96% rename from AdvancedSharpAdbClient/Extensions/ThreadExtensions.cs rename to AdvancedSharpAdbClient/Polyfills/Extensions/ThreadExtensions.cs index 77cbc596..adfcc1fc 100644 --- a/AdvancedSharpAdbClient/Extensions/ThreadExtensions.cs +++ b/AdvancedSharpAdbClient/Polyfills/Extensions/ThreadExtensions.cs @@ -8,7 +8,7 @@ using System.Runtime.CompilerServices; using System.Threading; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Polyfills { #if WINDOWS_UWP /// @@ -16,7 +16,7 @@ namespace AdvancedSharpAdbClient /// /// A whose foreground thread to switch execution to. /// Specifies the priority for event dispatch. - [Browsable(false)] + [EditorBrowsable(EditorBrowsableState.Never)] public readonly struct DispatcherThreadSwitcher(CoreDispatcher dispatcher, CoreDispatcherPriority priority) : INotifyCompletion { /// @@ -54,7 +54,7 @@ public void OnCompleted(Action continuation) /// /// A whose foreground thread to switch execution to. /// Specifies the priority for event dispatch. - [Browsable(false)] + [EditorBrowsable(EditorBrowsableState.Never)] public readonly struct DispatcherQueueThreadSwitcher(DispatcherQueue dispatcher, DispatcherQueuePriority priority) : INotifyCompletion { /// @@ -91,7 +91,7 @@ public void OnCompleted(Action continuation) /// /// A helper type for switch thread by . This type is not intended to be used directly from your code. /// - [Browsable(false)] + [EditorBrowsable(EditorBrowsableState.Never)] public readonly struct TaskThreadSwitcher : INotifyCompletion { /// diff --git a/AdvancedSharpAdbClient/Models/HashCode.cs b/AdvancedSharpAdbClient/Polyfills/HashCode.cs similarity index 99% rename from AdvancedSharpAdbClient/Models/HashCode.cs rename to AdvancedSharpAdbClient/Polyfills/HashCode.cs index fcf091eb..a88fa196 100644 --- a/AdvancedSharpAdbClient/Models/HashCode.cs +++ b/AdvancedSharpAdbClient/Polyfills/HashCode.cs @@ -47,7 +47,7 @@ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Polyfills { // xxHash32 is used for the hash code. // https://github.com/Cyan4973/xxHash diff --git a/AdvancedSharpAdbClient/Interfaces/IProgress.cs b/AdvancedSharpAdbClient/Polyfills/Interfaces/IProgress.cs similarity index 92% rename from AdvancedSharpAdbClient/Interfaces/IProgress.cs rename to AdvancedSharpAdbClient/Polyfills/Interfaces/IProgress.cs index 015e9510..5c88a752 100644 --- a/AdvancedSharpAdbClient/Interfaces/IProgress.cs +++ b/AdvancedSharpAdbClient/Polyfills/Interfaces/IProgress.cs @@ -2,7 +2,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Polyfills { /// Defines a provider for progress updates. /// The type of progress update value. diff --git a/AdvancedSharpAdbClient/Polyfills/NamespaceDoc.cs b/AdvancedSharpAdbClient/Polyfills/NamespaceDoc.cs new file mode 100644 index 00000000..d992eddf --- /dev/null +++ b/AdvancedSharpAdbClient/Polyfills/NamespaceDoc.cs @@ -0,0 +1,17 @@ +// +// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. +// + +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace AdvancedSharpAdbClient.Polyfills +{ + /// + /// The classes in this namespace provide polyfills. + /// + /// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. + [CompilerGenerated] + [EditorBrowsable(EditorBrowsableState.Never)] + internal class NamespaceDoc : AdvancedSharpAdbClient.NamespaceDoc { } +} diff --git a/AdvancedSharpAdbClient/Models/Point.cs b/AdvancedSharpAdbClient/Polyfills/Point.cs similarity index 99% rename from AdvancedSharpAdbClient/Models/Point.cs rename to AdvancedSharpAdbClient/Polyfills/Point.cs index 4f33c5a2..9f6ac9e0 100644 --- a/AdvancedSharpAdbClient/Models/Point.cs +++ b/AdvancedSharpAdbClient/Polyfills/Point.cs @@ -5,7 +5,7 @@ using System; using System.Diagnostics.CodeAnalysis; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Polyfills { /// /// Represents an ordered pair of x and y coordinates that define a point in a two-dimensional plane. diff --git a/AdvancedSharpAdbClient/Models/Rectangle.cs b/AdvancedSharpAdbClient/Polyfills/Rectangle.cs similarity index 99% rename from AdvancedSharpAdbClient/Models/Rectangle.cs rename to AdvancedSharpAdbClient/Polyfills/Rectangle.cs index 66919e9f..520e97a4 100644 --- a/AdvancedSharpAdbClient/Models/Rectangle.cs +++ b/AdvancedSharpAdbClient/Polyfills/Rectangle.cs @@ -5,7 +5,7 @@ using System; using System.Diagnostics.CodeAnalysis; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Polyfills { /// /// Stores the location and size of a rectangular region. diff --git a/AdvancedSharpAdbClient/Properties/GlobalUsings.cs b/AdvancedSharpAdbClient/Properties/GlobalUsings.cs index 7b52be14..9c9cc3a2 100644 --- a/AdvancedSharpAdbClient/Properties/GlobalUsings.cs +++ b/AdvancedSharpAdbClient/Properties/GlobalUsings.cs @@ -1,4 +1,15 @@ -#if NET +#region AdvancedSharpAdbClient +global using AdvancedSharpAdbClient.DeviceCommands; +global using AdvancedSharpAdbClient.Exceptions; +global using AdvancedSharpAdbClient.Logs; +global using AdvancedSharpAdbClient.Models; +global using AdvancedSharpAdbClient.Models.DeviceCommands; +global using AdvancedSharpAdbClient.Polyfills; +global using AdvancedSharpAdbClient.Receivers; +global using AdvancedSharpAdbClient.Receivers.DeviceCommands; +#endregion + +#if NET global using System.Runtime.Versioning; #endif diff --git a/AdvancedSharpAdbClient/Receivers/ConsoleOutputReceiver.cs b/AdvancedSharpAdbClient/Receivers/ConsoleOutputReceiver.cs index ff547197..8d857f41 100644 --- a/AdvancedSharpAdbClient/Receivers/ConsoleOutputReceiver.cs +++ b/AdvancedSharpAdbClient/Receivers/ConsoleOutputReceiver.cs @@ -2,14 +2,12 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; -using AdvancedSharpAdbClient.Logs; using System.Collections.Generic; using System.IO; using System.Text; using System.Text.RegularExpressions; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Receivers { /// /// Receives console output, and makes the console output available as a . To diff --git a/AdvancedSharpAdbClient/Receivers/IShellOutputReceiver.cs b/AdvancedSharpAdbClient/Receivers/IShellOutputReceiver.cs index 4444d39a..bd0f16a4 100644 --- a/AdvancedSharpAdbClient/Receivers/IShellOutputReceiver.cs +++ b/AdvancedSharpAdbClient/Receivers/IShellOutputReceiver.cs @@ -4,7 +4,7 @@ using System.Text; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Receivers { /// /// This interface contains various receivers that are able to parse Android console output. You can use diff --git a/AdvancedSharpAdbClient/Receivers/MultilineReceiver.cs b/AdvancedSharpAdbClient/Receivers/MultilineReceiver.cs index 15ccd798..f98c2765 100644 --- a/AdvancedSharpAdbClient/Receivers/MultilineReceiver.cs +++ b/AdvancedSharpAdbClient/Receivers/MultilineReceiver.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; -namespace AdvancedSharpAdbClient +namespace AdvancedSharpAdbClient.Receivers { /// /// A multiline receiver to receive and process shell output with multi lines. diff --git a/AdvancedSharpAdbClient/Receivers/NamespaceDoc.cs b/AdvancedSharpAdbClient/Receivers/NamespaceDoc.cs new file mode 100644 index 00000000..e332cc55 --- /dev/null +++ b/AdvancedSharpAdbClient/Receivers/NamespaceDoc.cs @@ -0,0 +1,18 @@ +// +// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. +// + +using System.ComponentModel; +using System.Runtime.CompilerServices; +using System.Text; + +namespace AdvancedSharpAdbClient.Receivers +{ + /// + /// The classes in this namespace provide receivers for . + /// + /// Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. + [CompilerGenerated] + [EditorBrowsable(EditorBrowsableState.Never)] + internal class NamespaceDoc : AdvancedSharpAdbClient.NamespaceDoc { } +} diff --git a/AdvancedSharpAdbClient/SyncService.Async.cs b/AdvancedSharpAdbClient/SyncService.Async.cs index 4c9c87cf..6e4acbfc 100644 --- a/AdvancedSharpAdbClient/SyncService.Async.cs +++ b/AdvancedSharpAdbClient/SyncService.Async.cs @@ -3,7 +3,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System; using System.Collections.Generic; using System.IO; diff --git a/AdvancedSharpAdbClient/SyncService.cs b/AdvancedSharpAdbClient/SyncService.cs index 2b5068ed..10e8e2f3 100644 --- a/AdvancedSharpAdbClient/SyncService.cs +++ b/AdvancedSharpAdbClient/SyncService.cs @@ -2,7 +2,6 @@ // Copyright (c) The Android Open Source Project, Ryan Conrad, Quamotion, yungd1plomat, wherewhere. All rights reserved. // -using AdvancedSharpAdbClient.Exceptions; using System; using System.Collections.Generic; using System.IO;