Skip to content

Commit 1b0c7e6

Browse files
author
Jose A. Fernandez
committed
Enhanced ColorHashSharp project to support multiple target frameworks and incremented version to 1.1.0. Created a new nuspec file for package metadata. Updated ColorHashSharp-icon.png binary file.
1 parent 83df5d1 commit 1b0c7e6

File tree

9 files changed

+119
-19
lines changed

9 files changed

+119
-19
lines changed
-75.2 KB
Loading

src/ColorHashSharp.Benchmarks/ColorHashSharp.Benchmarks.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
5+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />
11+
<PackageReference Include="BenchmarkDotNet" Version="0.15.2" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

src/ColorHashSharp.Benchmarks/ColorHashSharpBenchmarks.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
namespace ColorHashSharp.Benchmarks
1212
{
1313
[MemoryDiagnoser]
14-
[SimpleJob(RuntimeMoniker.Net60, baseline: true)]
15-
[SimpleJob(RuntimeMoniker.Net70)]
14+
[SimpleJob(RuntimeMoniker.Net48)]
15+
[SimpleJob(RuntimeMoniker.Net481)]
16+
[SimpleJob(RuntimeMoniker.Net80, baseline: true)]
17+
[SimpleJob(RuntimeMoniker.Net90)]
18+
[SimpleJob(RuntimeMoniker.Net10_0)]
1619
public class ColorHashSharpBenchmarks
1720
{
1821
private const string STRING_TO_HASH = "The Force will be with you always";

src/ColorHashSharp.Tests/ColorHashSharp.Tests.csproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
5-
4+
<TargetFramework>net9.0</TargetFramework>
65
<IsPackable>false</IsPackable>
76
</PropertyGroup>
87

98
<ItemGroup>
10-
<PackageReference Include="coverlet.msbuild" Version="3.2.0">
9+
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
1110
<PrivateAssets>all</PrivateAssets>
1211
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1312
</PackageReference>
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
15-
<PackageReference Include="xunit" Version="2.4.2" />
16-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
14+
<PackageReference Include="xunit" Version="2.9.3" />
15+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.1">
1716
<PrivateAssets>all</PrivateAssets>
1817
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
1918
</PackageReference>

src/ColorHashSharp.sln

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ColorHashSharp.Tests", "Col
99
EndProject
1010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColorHashSharp.Benchmarks", "ColorHashSharp.Benchmarks\ColorHashSharp.Benchmarks.csproj", "{2CC808B2-AF1F-4556-B601-C755129CCEB0}"
1111
EndProject
12-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VS", "VS", "{811ECE6D-7BC3-458D-8B6E-09B85D0E1413}"
13-
EndProject
1412
Global
1513
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1614
Debug|Any CPU = Debug|Any CPU

src/ColorHashSharp/.editorconfig

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
2+
[*.{cs,vb}]
3+
#### Naming styles ####
4+
5+
# Naming rules
6+
7+
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
8+
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
9+
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
10+
11+
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
12+
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
13+
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
14+
15+
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
16+
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
17+
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
18+
19+
# Symbol specifications
20+
21+
dotnet_naming_symbols.interface.applicable_kinds = interface
22+
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
23+
dotnet_naming_symbols.interface.required_modifiers =
24+
25+
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
26+
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
27+
dotnet_naming_symbols.types.required_modifiers =
28+
29+
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
30+
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
31+
dotnet_naming_symbols.non_field_members.required_modifiers =
32+
33+
# Naming styles
34+
35+
dotnet_naming_style.begins_with_i.required_prefix = I
36+
dotnet_naming_style.begins_with_i.required_suffix =
37+
dotnet_naming_style.begins_with_i.word_separator =
38+
dotnet_naming_style.begins_with_i.capitalization = pascal_case
39+
40+
dotnet_naming_style.pascal_case.required_prefix =
41+
dotnet_naming_style.pascal_case.required_suffix =
42+
dotnet_naming_style.pascal_case.word_separator =
43+
dotnet_naming_style.pascal_case.capitalization = pascal_case
44+
45+
dotnet_naming_style.pascal_case.required_prefix =
46+
dotnet_naming_style.pascal_case.required_suffix =
47+
dotnet_naming_style.pascal_case.word_separator =
48+
dotnet_naming_style.pascal_case.capitalization = pascal_case
49+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
50+
tab_width = 4
51+
indent_size = 4
52+
end_of_line = crlf
53+
54+
[*.cs]
55+
csharp_indent_labels = one_less_than_current
56+
csharp_using_directive_placement = outside_namespace:silent
57+
csharp_prefer_simple_using_statement = true:suggestion
58+
csharp_prefer_braces = true:silent
59+
csharp_style_namespace_declarations = block_scoped:silent
60+
csharp_style_prefer_method_group_conversion = true:silent
61+
csharp_style_prefer_top_level_statements = true:silent
62+
csharp_style_prefer_primary_constructors = true:suggestion
63+
csharp_prefer_system_threading_lock = true:suggestion
64+
csharp_style_expression_bodied_methods = false:silent
65+
csharp_style_expression_bodied_constructors = false:silent
66+
csharp_style_expression_bodied_operators = false:silent
67+
csharp_style_expression_bodied_properties = true:silent
68+
csharp_style_expression_bodied_indexers = true:silent
69+
csharp_style_expression_bodied_accessors = true:silent
70+
csharp_style_expression_bodied_lambdas = true:silent
71+
csharp_style_expression_bodied_local_functions = false:silent
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.1</TargetFramework>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1;net48;net481;net8.0;net9.0</TargetFrameworks>
55
<RootNamespace>Fernandezja.ColorHashSharp</RootNamespace>
66
<SignAssembly>false</SignAssembly>
7-
<AssemblyVersion>1.0.0.0</AssemblyVersion>
8-
<FileVersion>1.0.0</FileVersion>
9-
<VersionPrefix>1.0.0</VersionPrefix>
7+
<AssemblyVersion>1.1.0.0</AssemblyVersion>
8+
<FileVersion>1.1.0</FileVersion>
9+
<VersionPrefix>1.1.0</VersionPrefix>
1010
<Description>Generate color based on the given string</Description>
1111
<Summary>Generate color based on the given string. C# port of ColorHash Javascript Library.</Summary>
1212
<Authors>Jose A. Fernandez</Authors>
13-
<PackageLicenseUrl>https://licenses.nuget.org/MIT</PackageLicenseUrl>
13+
<License>https://licenses.nuget.org/MIT</License>
1414
<PackageProjectUrl></PackageProjectUrl>
15-
<PackageIconUrl>https://raw.githubusercontent.com/fernandezja/ColorHashSharp/master/assets/icon/ColorHashSharp-icon.png</PackageIconUrl>
15+
<PackageIcon>ColorHashSharp-icon.png</PackageIcon>
1616
<RepositoryUrl>https://github.com/fernandezja/ColorHashSharp</RepositoryUrl>
1717
<PackageTags>color hash string hsl hex hexadecimal</PackageTags>
1818
<PackageReleaseNotes>Generate color based on the given string. C# port of ColorHash Javascript Library. See https://github.com/fernandezja/ColorHashSharp</PackageReleaseNotes>
@@ -26,5 +26,7 @@
2626
<ItemGroup>
2727
<None Include="D:\dev\fernandezja\ColorHashSharp\src\ColorHashSharp\.editorconfig" />
2828
</ItemGroup>
29-
29+
<ItemGroup>
30+
<None Include="Images\ColorHashSharp-icon.png" Pack="true" PackagePath=""/>
31+
</ItemGroup>
3032
</Project>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
3+
<metadata>
4+
<id>ColorHashSharp</id>
5+
<version>1.1.0</version>
6+
<authors>Jose A. Fernandez</authors>
7+
<owners>Jose A. Fernandez</owners>
8+
<license type="expression">MIT</license>
9+
<projectUrl>https://github.com/fernandezja/ColorHashSharp</projectUrl>
10+
<icon>ColorHashSharp-icon.png</icon>
11+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
12+
<description>Generate color based on the given string. C# port of ColorHash Javascript Library.</description>
13+
<summary>Generate color based on the given string. C# port of ColorHash Javascript Library.</summary>
14+
<releaseNotes>Generate color based on the given string. C# port of ColorHash Javascript Library. See https://github.com/fernandezja/ColorHashSharp</releaseNotes>
15+
<tags>color hash string hsl hex hexadecimal</tags>
16+
<repository type="git" url="https://github.com/fernandezja/ColorHashSharp" />
17+
</metadata>
18+
<files>
19+
<file src="bin/Release/netstandard2.0/ColorHashSharp.dll" target="lib/netstandard2.0/" />
20+
<file src="bin/Release/netstandard2.1/ColorHashSharp.dll" target="lib/netstandard2.1/" />
21+
<file src="bin/Release/net48/ColorHashSharp.dll" target="lib/net48/" />
22+
<file src="bin/Release/net481/ColorHashSharp.dll" target="lib/net481/" />
23+
<file src="bin/Release/net8.0/ColorHashSharp.dll" target="lib/net8.0/" />
24+
<file src="bin/Release/net9.0/ColorHashSharp.dll" target="lib/net9.0/" />
25+
<file src="assets/icon/ColorHashSharp-icon.png" target="." />
26+
</files>
27+
</package>
10.2 KB
Loading

0 commit comments

Comments
 (0)