Skip to content

Commit f0a145b

Browse files
committed
Add number interfaces
Add IInternalCloneable
1 parent 9b646c3 commit f0a145b

28 files changed

+145
-117
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 69 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bug report
22
description: Create a report to help us improve
3-
title: "Bug title"
3+
title: Bug title
44
labels: [bug]
55
body:
66
- type: textarea
@@ -31,62 +31,62 @@ body:
3131
label: NuGet package version
3232
description: Specify the version of AdvancedSharpAdbClient you're using.
3333
options:
34-
- "Latest Source"
35-
- "3.5.15"
36-
- "3.4.14"
37-
- "3.3.13"
38-
- "3.3.12"
39-
- "3.2.11"
40-
- "3.1.10"
41-
- "3.0.9"
42-
- "2.5.8"
43-
- "2.5.7"
44-
- "2.5.6"
45-
- "2.5.5"
46-
- "2.5.4"
47-
- "2.5.3"
48-
- "2.5.2"
49-
- "2.5.1"
50-
- "2.5.0"
51-
- "1.3.0-g"
52-
- "Others"
34+
- Latest Source
35+
- 3.5.15
36+
- 3.4.14
37+
- 3.3.13
38+
- 3.3.12
39+
- 3.2.11
40+
- 3.1.10
41+
- 3.0.9
42+
- 2.5.8
43+
- 2.5.7
44+
- 2.5.6
45+
- 2.5.5
46+
- 2.5.4
47+
- 2.5.3
48+
- 2.5.2
49+
- 2.5.1
50+
- 2.5.0
51+
- 1.3.0-g
52+
- Others
5353
- type: dropdown
5454
attributes:
5555
label: .NET Platform
5656
description: Please specify the .NET Platform you're using when you encountered the issue.
5757
multiple: true
5858
options:
59-
- ".NET Framework 2.0"
60-
- ".NET Framework 3.0"
61-
- ".NET Framework 3.5"
62-
- ".NET Framework 4.0"
63-
- ".NET Framework 4.5.x"
64-
- ".NET Framework 4.6.x"
65-
- ".NET Framework 4.7.x"
66-
- ".NET Framework 4.8.x"
67-
- ".NET Standard 1.x"
68-
- ".NET Standard 2.x"
69-
- ".NET Core 5.0"
70-
- ".NET Core App 1.x"
71-
- ".NET Core App 2.x"
72-
- ".NET Core App 3.x"
73-
- ".NET 5"
74-
- ".NET 6"
75-
- ".NET 7"
76-
- ".NET 8"
77-
- ".NET 9"
78-
- ".NET 10"
79-
- "Others"
59+
- .NET Framework 2.0
60+
- .NET Framework 3.0
61+
- .NET Framework 3.5
62+
- .NET Framework 4.0
63+
- .NET Framework 4.5.x
64+
- .NET Framework 4.6.x
65+
- .NET Framework 4.7.x
66+
- .NET Framework 4.8.x
67+
- .NET Standard 1.x
68+
- .NET Standard 2.x
69+
- .NET Core 5.0
70+
- .NET Core App 1.x
71+
- .NET Core App 2.x
72+
- .NET Core App 3.x
73+
- .NET 5
74+
- .NET 6
75+
- .NET 7
76+
- .NET 8
77+
- .NET 9
78+
- .NET 10
79+
- Others
8080
- type: dropdown
8181
attributes:
8282
label: Platform type
8383
description: Please specify the platform you're using when you encountered the issue.
8484
multiple: true
8585
options:
86-
- "Windows"
87-
- "Linux"
88-
- "MacOS"
89-
- "Others"
86+
- Windows
87+
- Linux
88+
- MacOS
89+
- Others
9090
- type: textarea
9191
attributes:
9292
label: System version
@@ -97,29 +97,30 @@ body:
9797
description: Which IDE are you using?
9898
multiple: true
9999
options:
100-
- "Visual Studio 2022-preview"
101-
- "Visual Studio 2022"
102-
- "Visual Studio 2019"
103-
- "Visual Studio 2017"
104-
- "Visual Studio 2015"
105-
- "Visual Studio 2012"
106-
- "Visual Studio 2010"
107-
- "Visual Studio Code"
108-
- "MonoDevelop 7.x"
109-
- "MonoDevelop 6.x"
110-
- "MonoDevelop 5.x"
111-
- "MonoDevelop 4.x"
112-
- "MonoDevelop 3.x"
113-
- "Rider 2025"
114-
- "Rider 2024"
115-
- "Rider 2023"
116-
- "Rider 2022"
117-
- "Rider 2021"
118-
- "Rider 2020"
119-
- "Rider 2019"
120-
- "Rider 2018"
121-
- "Rider 2017"
122-
- "Other"
100+
- Visual Studio Insiders
101+
- Visual Studio 2026
102+
- Visual Studio 2022
103+
- Visual Studio 2019
104+
- Visual Studio 2017
105+
- Visual Studio 2015
106+
- Visual Studio 2012
107+
- Visual Studio 2010
108+
- Visual Studio Code
109+
- MonoDevelop 7.x
110+
- MonoDevelop 6.x
111+
- MonoDevelop 5.x
112+
- MonoDevelop 4.x
113+
- MonoDevelop 3.x
114+
- Rider 2025
115+
- Rider 2024
116+
- Rider 2023
117+
- Rider 2022
118+
- Rider 2021
119+
- Rider 2020
120+
- Rider 2019
121+
- Rider 2018
122+
- Rider 2017
123+
- Other
123124
- type: textarea
124125
attributes:
125126
label: Additional context

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Feature request
22
description: Suggest an idea for this project
3-
title: "Feature title"
3+
title: Feature title
44
labels: [enhancement]
55
body:
66
- type: textarea
@@ -16,9 +16,9 @@ body:
1616
attributes:
1717
label: How important is this to you?
1818
options:
19-
- "Nice-to-have"
20-
- "Important"
21-
- "Critical"
19+
- Nice-to-have
20+
- Important
21+
- Critical
2222
- type: textarea
2323
attributes:
2424
label: Describe the solution you'd like
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Help Wanted
22
description: Want some helps
3-
title: "Help title"
3+
title: Help title
44
labels: [help wanted]
55
body:
66
- type: textarea
@@ -9,4 +9,4 @@ body:
99
attributes:
1010
label: What can we do for you?
1111
description: A clear and concise description what you want to help.
12-
placeholder: Please why [...]
12+
placeholder: Please why [...]

.github/workflows/build-and-test.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@ on:
44
push:
55
branches:
66
- main
7-
- 'version/**'
8-
pull_request:
9-
branches:
10-
- main
7+
- version/**
118
paths:
12-
- '.github/workflows/build-and-test.yml'
13-
- 'AdvancedSharpAdbClient**'
9+
- .github/workflows/build-and-test.yml
10+
- AdvancedSharpAdbClient**
11+
pull_request:
12+
branches: [main]
1413
workflow_dispatch:
1514

1615
env:
17-
DOTNET_VERSION: '10.0.x' # The .NET SDK version to use
16+
DOTNET_VERSION: 10.0.x # The .NET SDK version to use
1817

1918
jobs:
2019
build-and-test:
@@ -26,7 +25,7 @@ jobs:
2625

2726
steps:
2827
- name: Checkout
29-
uses: actions/checkout@v4
28+
uses: actions/checkout@v6
3029
with:
3130
fetch-depth: 0
3231

@@ -45,15 +44,15 @@ jobs:
4544
run: dotnet test --no-restore --blame-hang-timeout 1m -p:FullTargets=false
4645

4746
pack-and-publish:
48-
if: github.event_name == 'push'
47+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
4948
needs: build-and-test
5049
runs-on: windows-latest
5150
env:
5251
Solution_Name: AdvancedSharpAdbClient/AdvancedSharpAdbClient.csproj
5352

5453
steps:
5554
- name: Checkout
56-
uses: actions/checkout@v4
55+
uses: actions/checkout@v6
5756
with:
5857
fetch-depth: 0
5958

AdvancedSharpAdbClient.Tests/Dummys/Logs/DummyLoggerFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ internal class DummyLoggerFactory : ILoggerFactory
44
{
55
public ILogger CreateLogger(string categoryName) => new DummyLogger(categoryName);
66

7-
public ILogger<T> CreateLogger<T>() where T : allows ref struct => new DummyLogger<T>();
7+
public ILogger<T> CreateLogger<T>() => new DummyLogger<T>();
88
}
99
}

AdvancedSharpAdbClient/AdbClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace AdvancedSharpAdbClient
3030
/// <para><seealso href="https://github.com/android/platform_system_core/blob/master/adb/adb.c">adb.c</seealso></para>
3131
/// </remarks>
3232
[DebuggerDisplay($"{{{nameof(GetType)}().{nameof(Type.ToString)}(),nq}} \\{{ {nameof(EndPoint)} = {{{nameof(EndPoint)}}} }}")]
33-
public partial class AdbClient : IAdbClient, ICloneable<AdbClient>, ICloneable
33+
public partial class AdbClient : IAdbClient, IInternalCloneable<AdbClient>
3434
#if HAS_WINRT
3535
, IAdbClient.IWinRT
3636
#endif

AdvancedSharpAdbClient/AdbServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace AdvancedSharpAdbClient
2121
/// between clients and devices.</para>
2222
/// </summary>
2323
[DebuggerDisplay($"{{{nameof(GetType)}().{nameof(Type.ToString)}(),nq}} \\{{ {nameof(EndPoint)} = {{{nameof(EndPoint)}}}, {nameof(CachedAdbPath)} = {{{nameof(CachedAdbPath)}}} }}")]
24-
public partial class AdbServer : IAdbServer, ICloneable<AdbServer>, ICloneable
24+
public partial class AdbServer : IAdbServer, IInternalCloneable<AdbServer>
2525
{
2626
/// <summary>
2727
/// The minimum version of <c>adb.exe</c> that is supported by this library.

AdvancedSharpAdbClient/DeviceCommands/DeviceClient.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ namespace AdvancedSharpAdbClient.DeviceCommands
1919
/// <param name="AdbClient">The <see cref="IAdbClient"/> to use to communicate with the Android Debug Bridge.</param>
2020
/// <param name="Device">The device on which to process command.</param>
2121
[DebuggerDisplay($"{{{nameof(ToString)}(),nq}}")]
22-
public partial record class DeviceClient(IAdbClient AdbClient, DeviceData Device) : ICloneable<DeviceClient>, ICloneable
22+
public partial record class DeviceClient(IAdbClient AdbClient, DeviceData Device) : IInternalCloneable<DeviceClient>
23+
#if NET7_0_OR_GREATER
24+
, IEqualityOperators<DeviceClient, DeviceClient, bool>
25+
#endif
2326
{
2427
/// <summary>
2528
/// Gets the <see cref="IAdbClient"/> to use when communicating with the device.

AdvancedSharpAdbClient/DeviceCommands/Models/Element.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ namespace AdvancedSharpAdbClient.DeviceCommands.Models
1818
/// </summary>
1919
[DebuggerDisplay($"{{{nameof(GetType)}().{nameof(Type.ToString)}(),nq}} \\{{ {nameof(Bounds)} = {{{nameof(Bounds)}}}, {nameof(Class)} = {{{nameof(Class)}}}, {nameof(Text)} = {{{nameof(Text)}}}, {nameof(Package)} = {{{nameof(Package)}}}, {nameof(Device)} = {{{nameof(Device)}}} }}")]
2020
public class Element : IEquatable<Element>
21+
#if NET7_0_OR_GREATER
22+
, IEqualityOperators<Element, Element, bool>
23+
#endif
2124
{
2225
/// <summary>
2326
/// The <see cref="Array"/> of <see cref="char"/>s that separate the coordinates of the element.

AdvancedSharpAdbClient/DeviceCommands/Models/VersionInfo.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ namespace AdvancedSharpAdbClient.DeviceCommands.Models
1818
/// <param name="VersionName">The version name of the application.</param>
1919
[DebuggerDisplay($"{{{nameof(ToString)}(),nq}}")]
2020
public readonly record struct VersionInfo(int VersionCode, string VersionName) : IComparer, IComparer<VersionInfo>
21+
#if NET7_0_OR_GREATER
22+
, IComparisonOperators<VersionInfo, VersionInfo, bool>
23+
#endif
2124
{
2225
/// <summary>
2326
/// Initializes a new instance of the <see cref="VersionInfo"/> struct.

0 commit comments

Comments
 (0)