Skip to content

Commit 45d19e6

Browse files
committed
Add params collections
1 parent 9c454f8 commit 45d19e6

File tree

12 files changed

+15
-15
lines changed

12 files changed

+15
-15
lines changed

AdvancedSharpAdbClient/AdvancedSharpAdbClient.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
<When Condition="'$(FullTargets)' == 'True'">
2020
<PropertyGroup>
2121
<NoWarn>$(NoWarn);NU1603;NU1605;NU1902;NU1903</NoWarn>
22-
<TargetFrameworks>net6.0;net8.0;netcoreapp2.1;netcoreapp3.1;netstandard1.3;netstandard2.0;netstandard2.1</TargetFrameworks>
23-
<TargetFrameworks Condition="'$(IsWindows)' == 'True'">$(TargetFrameworks);net2.0;net3.5-client;net4.0-client;net4.5;net4.6.1;net4.8;net6.0-windows10.0.17763.0;net8.0-windows10.0.17763.0</TargetFrameworks>
22+
<TargetFrameworks>net6.0;net8.0;net9.0;netcoreapp2.1;netcoreapp3.1;netstandard1.3;netstandard2.0;netstandard2.1</TargetFrameworks>
23+
<TargetFrameworks Condition="'$(IsWindows)' == 'True'">$(TargetFrameworks);net2.0;net3.5-client;net4.0-client;net4.5;net4.6.1;net4.8;net6.0-windows10.0.17763.0;net8.0-windows10.0.17763.0;net9.0-windows10.0.17763.0</TargetFrameworks>
2424
<TargetFrameworks Condition="'$(GITHUB_ACTIONS)' != 'True' and '$(IsWindows)' == 'True'">$(TargetFrameworks);netcore5.0;uap10.0;uap10.0.15138.0</TargetFrameworks>
2525
</PropertyGroup>
2626
</When>

AdvancedSharpAdbClient/DeviceCommands/Receivers/PackageManagerReceiver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class PackageManagerReceiver(PackageManager packageManager) : MultiLineRe
2525
public PackageManager PackageManager => packageManager;
2626

2727
/// <inheritdoc/>
28-
protected override void ProcessNewLines(IEnumerable<string> lines)
28+
protected override void ProcessNewLines(params IEnumerable<string> lines)
2929
{
3030
PackageManager.Packages.Clear();
3131

AdvancedSharpAdbClient/DeviceMonitor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ private void ProcessIncomingDeviceData(string result)
345345
/// <summary>
346346
/// Processes the incoming <see cref="DeviceData"/>.
347347
/// </summary>
348-
protected virtual void UpdateDevices(IEnumerable<DeviceData> collection)
348+
protected virtual void UpdateDevices(params IEnumerable<DeviceData> collection)
349349
{
350350
lock (devices)
351351
{

AdvancedSharpAdbClient/Exceptions/JavaException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public JavaException(SerializationInfo serializationInfo, StreamingContext conte
103103
/// </summary>
104104
/// <param name="lines">A <see cref="IEnumerable{String}"/> which represents a <see cref="JavaException"/>.</param>
105105
/// <returns>The equivalent <see cref="JavaException"/>.</returns>
106-
public static JavaException Parse(IEnumerable<string> lines)
106+
public static JavaException Parse(params IEnumerable<string> lines)
107107
{
108108
string exception = string.Empty, message = string.Empty;
109109
StringBuilder stackTrace = new();

AdvancedSharpAdbClient/Extensions/EnumerableBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static class EnumerableBuilder
2121
/// </summary>
2222
/// <param name="values">The data that feeds the <see cref="AdbCommandLineStatus"/> struct.</param>
2323
/// <returns>A new instance of <see cref="AdbCommandLineStatus"/> struct.</returns>
24-
public static AdbCommandLineStatus AdbCommandLineStatusCreator(ReadOnlySpan<string> values) =>
24+
public static AdbCommandLineStatus AdbCommandLineStatusCreator(params ReadOnlySpan<string> values) =>
2525
AdbCommandLineStatus.GetVersionFromOutput(values);
2626

2727
/// <summary>
@@ -236,7 +236,7 @@ public static UnixFileStatus UnixFileStatusCreator(ReadOnlySpan<byte> values) =>
236236
};
237237
}
238238

239-
static void ReadLogEntry(BinaryReader reader, ICollection<object> parent)
239+
static void ReadLogEntry(BinaryReader reader, params ICollection<object> parent)
240240
{
241241
EventLogType type = (EventLogType)reader.ReadByte();
242242

AdvancedSharpAdbClient/Logs/LogReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public partial class LogReader(Stream stream)
190190
/// <summary>
191191
/// Reads a single log entry from the stream.
192192
/// </summary>
193-
protected static void ReadLogEntry(BinaryReader reader, ICollection<object> parent)
193+
protected static void ReadLogEntry(BinaryReader reader, params ICollection<object> parent)
194194
{
195195
EventLogType type = (EventLogType)reader.ReadByte();
196196

AdvancedSharpAdbClient/Models/AdbCommandLineStatus.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public readonly partial record struct AdbCommandLineStatus(Version? AdbVersion,
4545
/// </summary>
4646
/// <param name="output">The output of the <c>adb.exe version</c> command.</param>
4747
/// <returns>A <see cref="AdbCommandLineStatus"/> object that represents the version and path of the adb command line client.</returns>
48-
public static AdbCommandLineStatus GetVersionFromOutput(IEnumerable<string> output)
48+
public static AdbCommandLineStatus GetVersionFromOutput(params IEnumerable<string> output)
4949
{
5050
int index = 0;
5151
Version? adbVersion = null;
@@ -92,7 +92,7 @@ public static AdbCommandLineStatus GetVersionFromOutput(IEnumerable<string> outp
9292
/// </summary>
9393
/// <param name="output">The output of the <c>adb.exe version</c> command.</param>
9494
/// <returns>A <see cref="AdbCommandLineStatus"/> object that represents the version and path of the adb command line client.</returns>
95-
public static AdbCommandLineStatus GetVersionFromOutput(ReadOnlySpan<string> output)
95+
public static AdbCommandLineStatus GetVersionFromOutput(params ReadOnlySpan<string> output)
9696
{
9797
int index = 0;
9898
Version? adbVersion = null;

AdvancedSharpAdbClient/Models/DeviceData.EventArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public override string ToString()
4444
/// </summary>
4545
/// <param name="devices">The list of device.</param>
4646
[DebuggerDisplay($"{nameof(DeviceDataNotifyEventArgs)} \\{{ {nameof(Devices)} = {{{nameof(Devices)}}} }}")]
47-
public sealed class DeviceDataNotifyEventArgs(IEnumerable<DeviceData> devices) : EventArgs
47+
public sealed class DeviceDataNotifyEventArgs(params IEnumerable<DeviceData> devices) : EventArgs
4848
{
4949
/// <summary>
5050
/// Gets the list of device where the change occurred.

AdvancedSharpAdbClient/Polyfills/Extensions/EnumerableExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal static class EnumerableExtensions
2626
/// The collection itself cannot be <see langword="null"/>, but it can contain elements that are
2727
/// <see langword="null"/>, if type <typeparamref name="TSource"/> is a reference type.</param>
2828
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="collection"/> is null.</exception>
29-
public static void AddRange<TSource>(this ICollection<TSource> source, IEnumerable<TSource> collection)
29+
public static void AddRange<TSource>(this ICollection<TSource> source, params IEnumerable<TSource> collection)
3030
{
3131
ExceptionExtensions.ThrowIfNull(source);
3232
ExceptionExtensions.ThrowIfNull(collection);

AdvancedSharpAdbClient/Polyfills/StringHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public void AppendFormatted(string? value, int alignment = 0, string? format = n
251251
/// Writes the specified character span to the handler.
252252
/// </summary>
253253
/// <param name="value">The span to write.</param>
254-
public void AppendFormatted(ReadOnlySpan<char> value) => _ = _builder.Append(value);
254+
public void AppendFormatted(params ReadOnlySpan<char> value) => _ = _builder.Append(value);
255255

256256
/// <summary>
257257
/// Writes the specified string of chars to the handler.

0 commit comments

Comments
 (0)