Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit 9d795eb

Browse files
Develop (#3)
* Refactored project structure * Update SpeedTestSharp.csproj (#2)
1 parent c195751 commit 9d795eb

6 files changed

Lines changed: 22 additions & 10 deletions

File tree

.github/workflows/publish_nuget.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Setup Publish NuGet package
3232
uses: nuget/setup-nuget@v1
3333
with:
34-
nuget-api-key: ${{ secrets.NUGET_API_KEY }} # Replace with your NuGet API key
34+
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
3535

3636
- name: Publish NuGet package
3737
run: dotnet nuget push src/SpeedTestSharp/bin/Release/*.nupkg --skip-duplicate --source https://www.nuget.org/packages/SuchByte.SpeedTestSharp -k ${{ secrets.NUGET_API_KEY }}

SpeedTestSharp.sln

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,20 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeedTestSharp", "src\Speed
44
EndProject
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4BB838F4-80CA-422C-BF32-C40F33891655}"
66
EndProject
7-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeedTestSharp.Example", "src\SpeedTestSharp.Example\SpeedTestSharp.Example.csproj", "{FAF42610-0443-4FA6-94FC-C4B5144E46B9}"
7+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpeedTestSharp.Example", "examples\SpeedTestSharp.Example\SpeedTestSharp.Example.csproj", "{FAF42610-0443-4FA6-94FC-C4B5144E46B9}"
8+
EndProject
9+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{3845BC2F-B93A-40B7-9AE6-BDD8C7FAE1A4}"
10+
EndProject
11+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution", "solution", "{B1276002-EF52-48F4-9F09-6F8E7B8A044F}"
12+
ProjectSection(SolutionItems) = preProject
13+
LICENSE = LICENSE
14+
README.md = README.md
15+
EndProjectSection
16+
EndProject
17+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{3DFA2DE3-9EBC-4AB3-86EF-C459A246A958}"
18+
ProjectSection(SolutionItems) = preProject
19+
.github\workflows\publish_nuget.yml = .github\workflows\publish_nuget.yml
20+
EndProjectSection
821
EndProject
922
Global
1023
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -23,6 +36,6 @@ Global
2336
EndGlobalSection
2437
GlobalSection(NestedProjects) = preSolution
2538
{E98FEB7F-43D5-4832-9352-8B481742E08F} = {4BB838F4-80CA-422C-BF32-C40F33891655}
26-
{FAF42610-0443-4FA6-94FC-C4B5144E46B9} = {4BB838F4-80CA-422C-BF32-C40F33891655}
39+
{FAF42610-0443-4FA6-94FC-C4B5144E46B9} = {3845BC2F-B93A-40B7-9AE6-BDD8C7FAE1A4}
2740
EndGlobalSection
2841
EndGlobal

src/SpeedTestSharp.Example/Program.cs renamed to examples/SpeedTestSharp.Example/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
ISpeedTestClient speedTestClient = new SpeedTestClient();
77

8-
speedTestClient.StageChanged += (sender, stage) =>
8+
speedTestClient.StageChanged += (_, stage) =>
99
{
1010
Console.WriteLine($"Changed stage to: {stage}");
1111
};
1212

13-
speedTestClient.ProgressChanged += (sender, info) =>
13+
speedTestClient.ProgressChanged += (_, info) =>
1414
{
1515
switch (speedTestClient.CurrentStage)
1616
{

src/SpeedTestSharp.Example/SpeedTestSharp.Example.csproj renamed to examples/SpeedTestSharp.Example/SpeedTestSharp.Example.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<ProjectReference Include="..\SpeedTestSharp\SpeedTestSharp.csproj" />
11+
<ProjectReference Include="..\..\src\SpeedTestSharp\SpeedTestSharp.csproj" />
1212
</ItemGroup>
1313

1414
</Project>

src/SpeedTestSharp/Client/SpeedTestClient.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ public async Task<SpeedTestResult> TestSpeedAsync(SpeedUnit speedUnit,
6767
var latency = await TestServerLatencyAsync(server);
6868
serverLatency.TryAdd(server, latency);
6969
}
70-
catch (Exception ex)
70+
catch
7171
{
72-
Console.WriteLine(ex.Message);
7372
// ignore this server
7473
}
7574
}

src/SpeedTestSharp/SpeedTestSharp.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1111
<Authors>SuchByte</Authors>
1212
<PackageProjectUrl>https://github.com/SuchByte/SpeedTestSharp</PackageProjectUrl>
13-
<PackageLicenseUrl>https://github.com/SuchByte/SpeedTestSharp/blob/master/LICENSE</PackageLicenseUrl>
13+
<PackageLicenseUrl>https://github.com/SuchByte/SpeedTestSharp/blob/main/LICENSE</PackageLicenseUrl>
1414
<RepositoryUrl>https://github.com/SuchByte/SpeedTestSharp</RepositoryUrl>
1515
<PackageTags>SpeedTest Internet</PackageTags>
16-
<Version>1.0.1</Version>
16+
<Version>1.0.2</Version>
1717
</PropertyGroup>
1818

1919
</Project>

0 commit comments

Comments
 (0)