Skip to content

Commit

Permalink
Merge pull request #13 from BenjaminAbt/feature/nuget-enhancements
Browse files Browse the repository at this point in the history
add nuget information
  • Loading branch information
BenjaminAbt committed Apr 2, 2024
2 parents 19cf5ec + d943dae commit d61cbee
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 43 deletions.
29 changes: 21 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,44 @@
StrongOf helps to implement primitives as a strong type that represents a domain object (e.g. UserId, EmailAddress, etc.). It is a simple class that wraps a value and provides a few helper methods to make it easier to work with.
In contrast to other approaches, StrongOf is above all simple and performant - and not over-engineered.
</Description>
<DefaultLanguage>en-US</DefaultLanguage>
<NoPackageAnalysis>true</NoPackageAnalysis>
<DebugType>embedded</DebugType>
</PropertyGroup>

<!-- Assembly -->
<PropertyGroup>
<PropertyGroup Label="Env">
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
<IsBenchmarkProject>$(MsBuildProjectName.Contains('Benchmark'))</IsBenchmarkProject>
</PropertyGroup>

<PropertyGroup Label="Assembly">
<GlobalNamespacePrefix>StrongOf</GlobalNamespacePrefix>
<GlobalAssemblyNamePrefix>BenjaminAbt.StrongOf</GlobalAssemblyNamePrefix>
</PropertyGroup>

<!-- Project Defaults -->
<PropertyGroup>
<PropertyGroup Label="Project Defaults">
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
</PropertyGroup>

<!-- Package -->
<PropertyGroup>
<PropertyGroup Label="Package">
<IsPackable>false</IsPackable>
<PackageProjectUrl>https://github.com/BenjaminAbt/StrongOf</PackageProjectUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Description>Primitive Obsession with .NET</Description>
<MinClientVersion>2.12</MinClientVersion>
<PackageTags>Strong, StrongOf, DDD, Value Objects, Domain Driven Design</PackageTags>
<IsPackable>false</IsPackable>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>

<!-- C# -->
<PropertyGroup>
<PropertyGroup Label="C#">
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition="'$(IsTestProject)' != 'true' AND '$(IsBenchmarkProject)' != 'true'">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
</Project>
3 changes: 1 addition & 2 deletions src/StrongOf.AspNetCore/StrongOf.AspNetCore.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<!-- Package -->
<PropertyGroup>
<PropertyGroup Label="Package">
<IsPackable>true</IsPackable>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
Expand Down
2 changes: 1 addition & 1 deletion src/StrongOf.FluentValidation/StrongIn64Validators.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static class StrongIn64Validators
/// <typeparam name="T">The type of the object being validated.</typeparam>
/// <typeparam name="TStrong">The type of the strong Int64.</typeparam>
/// <param name="rule">The rule builder.</param>
/// <param name="min">The maximum value.</param>
/// <param name="max">The maximum value.</param>
/// <returns>The rule builder options.</returns>
public static IRuleBuilderOptions<T, TStrong?> HasMaximum<T, TStrong>(this IRuleBuilder<T, TStrong?> rule, long max)
where TStrong : StrongInt64<TStrong>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<!-- Package -->
<PropertyGroup>
<PropertyGroup Label="Package">
<IsPackable>true</IsPackable>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
Expand Down
5 changes: 2 additions & 3 deletions src/StrongOf.Json/StrongOf.Json.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<!-- Package -->
<PropertyGroup>
<PropertyGroup Label="Package">
<IsPackable>true</IsPackable>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
Expand All @@ -17,6 +16,6 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\StrongOf\StrongOf.csproj" />
<ProjectReference Include="..\StrongOf\StrongOf.csproj" />
</ItemGroup>
</Project>
5 changes: 0 additions & 5 deletions src/StrongOf/StrongDateTime.Operators.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
namespace StrongOf;

/// <summary>
/// Represents a strongly typed DateTime value.
/// </summary>
/// <typeparam name="TStrong">The type of the strong DateTime.</typeparam>
/// <remarks>"The DateTime type has some design flaws. Please migrate to DateTimeOffset."</remarks>
public abstract partial class StrongDateTime<TStrong>
{
/// <summary>
Expand Down
4 changes: 0 additions & 4 deletions src/StrongOf/StrongDateTimeOffset.Operators.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
namespace StrongOf;

/// <summary>
/// Represents a strongly typed DateTimeOffset.
/// </summary>
/// <typeparam name="TStrong">The type of the strong DateTimeOffset.</typeparam>
public abstract partial class StrongDateTimeOffset<TStrong>
{
/// <summary>
Expand Down
4 changes: 0 additions & 4 deletions src/StrongOf/StrongInt32.Operators.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
namespace StrongOf;

/// <summary>
/// Represents a strong type of Int32.
/// </summary>
/// <typeparam name="TStrong">The type of the strong Int32.</typeparam>
public abstract partial class StrongInt32<TStrong>
{
/// <summary>
Expand Down
4 changes: 0 additions & 4 deletions src/StrongOf/StrongInt64.Operators.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
namespace StrongOf;

/// <summary>
/// Represents a strong type of Int64.
/// </summary>
/// <typeparam name="TStrong">The type of the strong Int64.</typeparam>
public abstract partial class StrongInt64<TStrong>
{
/// <summary>
Expand Down
3 changes: 1 addition & 2 deletions src/StrongOf/StrongOf.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<!-- Package -->
<PropertyGroup>
<PropertyGroup Label="Package">
<IsPackable>true</IsPackable>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
Expand Down
4 changes: 0 additions & 4 deletions src/StrongOf/StrongString.Methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

namespace StrongOf;

/// <summary>
/// Represents a strong string of a specific type.
/// </summary>
/// <typeparam name="TStrong">The type of the strong string.</typeparam>
public abstract partial class StrongString<TStrong>
{
/// <summary>
Expand Down
4 changes: 0 additions & 4 deletions src/StrongOf/StrongString.Properties.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
namespace StrongOf;

/// <summary>
/// Represents a strong string of a specific type.
/// </summary>
/// <typeparam name="TStrong">The type of the strong string.</typeparam>
public abstract partial class StrongString<TStrong>
{
/// <summary>
Expand Down

0 comments on commit d61cbee

Please sign in to comment.