Skip to content
Closed
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
29 changes: 6 additions & 23 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
<PropertyGroup>
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
<Authors>Eric Burcham</Authors>
<CodeAnalysisRuleSet>../../StyleCopAnalyzers.ruleset</CodeAnalysisRuleSet>
<Company>Eric Burcham</Company>
<CopyrightCurrentYear>$([System.DateTime]::Now.Year)</CopyrightCurrentYear>
<CopyrightStartYear>2023</CopyrightStartYear>
<Copyright>© $(CopyrightStartYear) - $(CopyrightCurrentYear) Eric Burcham</Copyright>
<CopyrightStartYear>2023</CopyrightStartYear>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<ImplicitUsings>disable</ImplicitUsings>
<IsPackable>False</IsPackable>
Expand All @@ -18,42 +19,24 @@
<Product>DataJam</Product>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
</PropertyGroup>

<!-- Pin default version information -->
<PropertyGroup>
<VersionPrefix>0.0.0</VersionPrefix>
<GenerateAssemblyVersionAttribute>true</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>true</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>true</GenerateAssemblyInformationalVersionAttribute>
</PropertyGroup>

<!-- Treat all warnings as errors -->
<PropertyGroup>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
</PropertyGroup>

<!-- Disable annoying warnings -->
<PropertyGroup>
<NoWarn>1702;CS1591;MSB3277;NETSDK1138;NU5104;NU1702;NU1803;NU1901;NU1902;NU1903</NoWarn>
<GenerateAssemblyVersionAttribute>true</GenerateAssemblyVersionAttribute>
<VersionPrefix>0.0.0</VersionPrefix>
</PropertyGroup>

<!-- Stylecop Analyzers -->
<ItemGroup>
<AdditionalFiles Include="../../stylecop.json" Link="stylecop.json"/>
<PackageReference Include="StyleCop.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<!-- Include Stylecop.json -->
<ItemGroup>
<AdditionalFiles Include="../../stylecop.json" Link="stylecop.json"/>
</ItemGroup>

<!-- Include StyleCop RuleSet -->
<PropertyGroup>
<CodeAnalysisRuleSet>../../StyleCopAnalyzers.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

</Project>
1 change: 0 additions & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
<PackageVersion Include="MySql.Data" Version="9.2.0" />
<PackageVersion Include="MySql.Data.EntityFramework" Version="9.2.0" />
<PackageVersion Include="MySql.EntityFrameworkCore" Version="9.0.0" />
<PackageVersion Include="NSubstitute" Version="5.3.0" />
<PackageVersion Include="System.Data.SqlClient" Version="4.8.6" />
<PackageVersion Include="Testcontainers" Version="4.3.0" />
<PackageVersion Include="Testcontainers.MsSql" Version="4.3.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ namespace DataJam.Testing;
public interface IIdentityStrategy<in T>
where T : class
{
/// <summary>Assigns the identity values.</summary>
/// <param name="entity">The entity to assign the identity value for.</param>
void Assign(T entity);
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ protected IdentityStrategy(Expression<Func<T, TIdentity>> propertyExpression)
/// <summary>Gets or sets the last value of the identity for this Type.</summary>
public TIdentity LastValue { get; protected set; } = default!;

/// <summary>Assigns the identity values.</summary>
/// <param name="entity">The entity to assign the identity value for.</param>
/// <inheritdoc cref="IIdentityStrategy{T}.Assign"/>
public void Assign(T entity)
{
_identitySetter.Invoke(entity);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NoWarn>$(NoWarn);NETSDK1206</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NUnit"/>
<PackageReference Include="Microsoft.EntityFrameworkCore"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NoWarn>$(NoWarn);NETSDK1206</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AwesomeAssertions"/>
<PackageReference Include="NUnit"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NoWarn>$(NoWarn);NETSDK1206</NoWarn>
</PropertyGroup>

<ItemGroup>
<None Remove="DataJam.TestSupport.csproj.DotSettings"/>
</ItemGroup>
Expand Down
17 changes: 1 addition & 16 deletions src/test-support/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,7 @@
<Import Project="../Directory.Build.props"/>

<PropertyGroup>
<IsPackable>False</IsPackable>
</PropertyGroup>

<!-- Include Stylecop.json -->
<ItemGroup>
<!-- Removes the stylecop.json file included from the outer Directory.Build.props file-->
<AdditionalFiles Remove="../../stylecop.json" Link="stylecop.json"/>

<!-- Add the stylecop.json file that is specific to the code folder. -->
<AdditionalFiles Include="../stylecop.json" Link="stylecop.json"/>
</ItemGroup>


<!-- Include StyleCop RuleSet -->
<PropertyGroup>
<CodeAnalysisRuleSet>../StyleCopAnalyzers.ruleset</CodeAnalysisRuleSet>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>

</Project>
Loading