Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,20 @@ if ($null -eq (Get-Command "dotnet" -ErrorAction Ignore)) {
}

dotnet tool restore
if ($LastExitCode -ne 0) { exit $LastExitCode }

dotnet restore
if ($LastExitCode -ne 0) { exit $LastExitCode }

dotnet build --no-restore --configuration Release
if ($LastExitCode -ne 0) { exit $LastExitCode }

dotnet test --no-build --configuration Release --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml --coverage-settings .runsettings
if ($LastExitCode -ne 0) { exit $LastExitCode }

dotnet reportgenerator -reports:**/TestResults/**/coverage.cobertura.xml -targetdir:CoverageReport -reporttypes:"TextSummary" -verbosity:off
if ($LastExitCode -ne 0) { exit $LastExitCode }

Write-Host ""
Write-Host "Code coverage report:" -ForegroundColor DarkGreen
Write-Host ""
Expand Down
1 change: 0 additions & 1 deletion samples/EnvSample/EnvSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.1" />
</ItemGroup>

Expand Down
1 change: 0 additions & 1 deletion samples/LinkSample/LinkSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.1" />
</ItemGroup>

Expand Down
1 change: 0 additions & 1 deletion samples/NetInfoSample/NetInfoSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.1" />
</ItemGroup>

Expand Down
24 changes: 12 additions & 12 deletions src/Hyphen.Sdk/Abstractions/IEnv.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public interface IEnv
/// Gets a <see cref="bool"/> value from the given environment variable.
/// </summary>
/// <param name="name">The environment variable name</param>
/// <param name="required">When <c>true</c> and the variable does not exist (or is in the wrong
/// format), will throw; when <c>false</c>, will return <c>null</c> instead.</param>
/// <param name="required">When <see langword="true"/> and the variable does not exist (or is in the wrong
/// format), will throw; when <see langword="false"/>, will return <see langword="null"/> instead.</param>
/// <returns>The value</returns>
/// <exception cref="InvalidOperationException">Thrown when <paramref name="required"/> is true
/// and the variable does not exist (or is in the wrong format).</exception>
Expand All @@ -33,8 +33,8 @@ public interface IEnv
/// <param name="name">The environment variable name</param>
/// <param name="numberStyles">A bitwise combination of enumeration values that indicates the permitted format.</param>
/// <param name="formatProvider">An object that supplies culture-specific parsing information.</param>
/// <param name="required">When <c>true</c> and the variable does not exist (or is in the wrong
/// format), will throw; when <c>false</c>, will return <c>null</c> instead.</param>
/// <param name="required">When <see langword="true"/> and the variable does not exist (or is in the wrong
/// format), will throw; when <see langword="false"/>, will return <see langword="null"/> instead.</param>
/// <returns>The value</returns>
/// <exception cref="InvalidOperationException">Thrown when <paramref name="required"/> is true
/// and the variable does not exist (or is in the wrong format).</exception>
Expand All @@ -46,8 +46,8 @@ public interface IEnv
/// <param name="name">The environment variable name</param>
/// <param name="numberStyles">A bitwise combination of enumeration values that indicates the permitted format.</param>
/// <param name="formatProvider">An object that supplies culture-specific parsing information.</param>
/// <param name="required">When <c>true</c> and the variable does not exist (or is in the wrong
/// format), will throw; when <c>false</c>, will return <c>null</c> instead.</param>
/// <param name="required">When <see langword="true"/> and the variable does not exist (or is in the wrong
/// format), will throw; when <see langword="false"/>, will return <see langword="null"/> instead.</param>
/// <returns>The value</returns>
/// <exception cref="InvalidOperationException">Thrown when <paramref name="required"/> is true
/// and the variable does not exist (or is in the wrong format).</exception>
Expand All @@ -59,8 +59,8 @@ public interface IEnv
/// <param name="name">The environment variable name</param>
/// <param name="numberStyles">A bitwise combination of enumeration values that indicates the permitted format.</param>
/// <param name="formatProvider">An object that supplies culture-specific parsing information.</param>
/// <param name="required">When <c>true</c> and the variable does not exist (or is in the wrong
/// format), will throw; when <c>false</c>, will return <c>null</c> instead.</param>
/// <param name="required">When <see langword="true"/> and the variable does not exist (or is in the wrong
/// format), will throw; when <see langword="false"/>, will return <see langword="null"/> instead.</param>
/// <returns>The value</returns>
/// <exception cref="InvalidOperationException">Thrown when <paramref name="required"/> is true
/// and the variable does not exist (or is in the wrong format).</exception>
Expand All @@ -72,8 +72,8 @@ public interface IEnv
/// <param name="name">The environment variable name</param>
/// <param name="numberStyles">A bitwise combination of enumeration values that indicates the permitted format.</param>
/// <param name="formatProvider">An object that supplies culture-specific parsing information.</param>
/// <param name="required">When <c>true</c> and the variable does not exist (or is in the wrong
/// format), will throw; when <c>false</c>, will return <c>null</c> instead.</param>
/// <param name="required">When <see langword="true"/> and the variable does not exist (or is in the wrong
/// format), will throw; when <see langword="false"/>, will return <see langword="null"/> instead.</param>
/// <returns>The value</returns>
/// <exception cref="InvalidOperationException">Thrown when <paramref name="required"/> is true
/// and the variable does not exist (or is in the wrong format).</exception>
Expand All @@ -83,8 +83,8 @@ public interface IEnv
/// Gets a <see cref="string"/> value from the given environment variable.
/// </summary>
/// <param name="name">The environment variable name</param>
/// <param name="required">When <c>true</c> and the variable does not exist, will throw;
/// when <c>false</c>, will return <c>null</c> instead.</param>
/// <param name="required">When <see langword="true"/> and the variable does not exist, will throw;
/// when <see langword="false"/>, will return <see langword="null"/> instead.</param>
/// <returns>The value</returns>
/// <exception cref="InvalidOperationException">Thrown when <paramref name="required"/> is true
/// and the variable does not exist (or is in the wrong format).</exception>
Expand Down
12 changes: 6 additions & 6 deletions src/Hyphen.Sdk/Abstractions/ILink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public interface ILink
/// <param name="shortCodeId">The short code ID. (Example: <c>"code_686bed403c3991bd676bba4d"</c>)</param>
/// <param name="qrCodeId">The QR code ID. (Example: <c>"lqr_66fc51fe144cf3a1bd2a35b1"</c>)</param>
/// <param name="cancellationToken">The cancellation token to cancel the request early</param>
/// <returns>Returns the QR code, if present; returns <c>null</c> for an unknown short code ID
/// <returns>Returns the QR code, if present; returns <see langword="null"/> for an unknown short code ID
/// or QR code ID or organization ID.</returns>
/// <exception cref="ApiKeyException">Thrown if the API key is not valid.</exception>
/// <exception cref="HttpStatusCodeException">Thrown if the API returned an unexpected status code.</exception>
Expand All @@ -67,7 +67,7 @@ public interface ILink
/// <param name="shortCodeId">The short code ID. (Example: <c>"code_686bed403c3991bd676bba4d"</c>)</param>
/// <param name="parms">Optional parameters for getting the list of QR codes.</param>
/// <param name="cancellationToken">The cancellation token to cancel the request early</param>
/// <returns>The list of QR codes that match the search options; returns <c>null</c> for an unknown
/// <returns>The list of QR codes that match the search options; returns <see langword="null"/> for an unknown
/// short code ID or organization ID.</returns>
/// <exception cref="ApiKeyException">Thrown if the API key is not valid.</exception>
/// <exception cref="HttpStatusCodeException">Thrown if the API returned an unexpected status code.</exception>
Expand All @@ -78,7 +78,7 @@ public interface ILink
/// </summary>
/// <param name="shortCodeId">The short code ID. (Example: <c>"code_686bed403c3991bd676bba4d"</c>)</param>
/// <param name="cancellationToken">The cancellation token to cancel the request early</param>
/// <returns>Returns the short code, if available; returns <c>null</c> for an unknown code or organization ID.</returns>
/// <returns>Returns the short code, if available; returns <see langword="null"/> for an unknown code or organization ID.</returns>
/// <exception cref="ApiKeyException">Thrown if the API key is not valid.</exception>
/// <exception cref="HttpStatusCodeException">Thrown if the API returned an unexpected status code.</exception>
Task<ShortCodeResult?> GetShortCode(string shortCodeId, CancellationToken cancellationToken);
Expand All @@ -88,7 +88,7 @@ public interface ILink
/// </summary>
/// <param name="parms">Optional parameters for getting the list of short codes.</param>
/// <param name="cancellationToken">The cancellation token to cancel the request early</param>
/// <returns>The list of short codes that match the search options; returns <c>null</c> for an unknown organization ID.</returns>
/// <returns>The list of short codes that match the search options; returns <see langword="null"/> for an unknown organization ID.</returns>
/// <exception cref="ApiKeyException">Thrown if the API key is not valid.</exception>
/// <exception cref="HttpStatusCodeException">Thrown if the API returned an unexpected status code.</exception>
Task<PagedResult<ShortCodeResult>?> GetShortCodes(GetShortCodesParams? parms, CancellationToken cancellationToken);
Expand All @@ -100,7 +100,7 @@ public interface ILink
/// <param name="startDate">The start date.</param>
/// <param name="endDate">The end date.</param>
/// <param name="cancellationToken">The cancellation token to cancel the request early</param>
/// <returns>The statistics for the given short code, if present; returns <c>null</c>
/// <returns>The statistics for the given short code, if present; returns <see langword="null"/>
/// for an unknown short code ID or organization ID.</returns>
/// <exception cref="ApiKeyException">Thrown if the API key is not valid.</exception>
/// <exception cref="HttpStatusCodeException">Thrown if the API returned an unexpected status code.</exception>
Expand All @@ -110,7 +110,7 @@ public interface ILink
/// Gets a list of all the tags used by the organization's short codes.
/// </summary>
/// <param name="cancellationToken">The cancellation token to cancel the request early</param>
/// <returns>The combined list of tags, if present; returns <c>null</c> for an unknown organization ID.</returns>
/// <returns>The combined list of tags, if present; returns <see langword="null"/> for an unknown organization ID.</returns>
/// <exception cref="ApiKeyException">Thrown if the API key is not valid.</exception>
/// <exception cref="HttpStatusCodeException">Thrown if the API returned an unexpected status code.</exception>
Task<string[]?> GetTags(CancellationToken cancellationToken);
Expand Down
19 changes: 0 additions & 19 deletions src/Hyphen.Sdk/Extensions/HyphenSdkColorExtensions.cs

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions src/Hyphen.Sdk/Extensions/HyphenSdkEnumExtensions.cs

This file was deleted.

Loading