Skip to content

Commit

Permalink
nuint requires System namespace when targeting net6.0-maccatalyst…
Browse files Browse the repository at this point in the history
… / net6.0-android
  • Loading branch information
MartyIX committed Nov 3, 2022
1 parent 7b21573 commit 5463779
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Sodium.Core/Sodium.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<LangVersion>9.0</LangVersion>
<Features>strict</Features>
<Nullable>enable</Nullable>
Expand Down
3 changes: 2 additions & 1 deletion src/Sodium.Core/SodiumCore.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Runtime.InteropServices;
using static Interop.Libsodium;

Expand Down Expand Up @@ -29,7 +30,7 @@ public static byte[] GetRandomBytes(int count)
public static int GetRandomNumber(int upperBound)
{
if (upperBound < 0)
throw new System.ArgumentOutOfRangeException(nameof(upperBound), "upperBound cannot be negative");
throw new ArgumentOutOfRangeException(nameof(upperBound), "upperBound cannot be negative");

SodiumCore.Initialize();
var randomNumber = randombytes_uniform((uint)upperBound);
Expand Down
3 changes: 3 additions & 0 deletions src/Sodium.Core/Utilities.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#if !NETSTANDARD2_0_OR_GREATER
using System;
#endif
using static Interop.Libsodium;

namespace Sodium
Expand Down

0 comments on commit 5463779

Please sign in to comment.