Skip to content

Commit

Permalink
finalize netstandard2.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
aevitas committed Jul 18, 2024
1 parent 14259d4 commit 5ce0d1a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/FlakeId.Benchmarks/FlakeId.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/FlakeId.Tests/FlakeId.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net461;net462;net47;net471;net472;net48;net481;</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
7 changes: 3 additions & 4 deletions src/FlakeId/FlakeId.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;netstandard2.1;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Description>Discord inspired Twitter like implementation of Snowflake IDs, focused on performance. Snowflakes are 64 bit, highly optimized, decentralized, K-ordered, unique identifiers.</Description>
<Description>Discord inspired, Twitter like implementation of Snowflake IDs, focused on performance. Snowflakes are 64 bit, highly optimized, decentralized, K-ordered, unique identifiers.</Description>
<RepositoryUrl>https://github.com/aevitas/flakeid</RepositoryUrl>
<PackageTags>snowflake, discord, discord id, unique id, uuid, flake, flake id</PackageTags>
<Authors>aevitas</Authors>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Version>1.1.3</Version>
<Version>1.2.0</Version>
<PackageId>FlakeId</PackageId>
<Product>FlakeId</Product>
<PackageIcon>snowflake-96.png</PackageIcon>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/FlakeId/Id.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,20 +160,20 @@ private void CreateInternal(long timeStampMs = 0)
}
}

public override readonly string ToString() => _value.ToString();
public override string ToString() => _value.ToString();

public static implicit operator long(Id id) => id._value;

public static bool operator ==(Id left, Id right) => left._value == right._value;

public static bool operator !=(Id left, Id right) => !(left == right);

public readonly int CompareTo(Id other) => _value.CompareTo(other._value);
public int CompareTo(Id other) => _value.CompareTo(other._value);

public readonly bool Equals(Id other) => _value == other._value;
public bool Equals(Id other) => _value == other._value;

public override readonly bool Equals(object obj) => obj is Id other && Equals(other);
public override bool Equals(object obj) => obj is Id other && Equals(other);

public override readonly int GetHashCode() => _value.GetHashCode();
public override int GetHashCode() => _value.GetHashCode();
}
}

0 comments on commit 5ce0d1a

Please sign in to comment.