Skip to content

Commit

Permalink
Update projects
Browse files Browse the repository at this point in the history
Fix warnings
  • Loading branch information
ardalis committed Jan 16, 2024
1 parent 0c6ed10 commit 8712b03
Show file tree
Hide file tree
Showing 19 changed files with 12 additions and 68 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<TargetFrameworks>net7.0;net6.0;net8.0;netstandard2.1</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Version>8.0.0</Version>
<LangVersion>11</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/SmartEnum.MessagePack/SmartEnumValueFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public TEnum Deserialize(ref MessagePackReader reader, MessagePackSerializerOpti
return default;
}

return SmartEnum<TEnum, TValue>.FromValue((TValue)Read(ref reader));
return SmartEnum<TEnum, TValue>.FromValue(Read(ref reader));
}

public TValue Read(ref MessagePackReader reader)
Expand Down
12 changes: 1 addition & 11 deletions src/SmartEnum/Exceptions/InvalidFlagEnumValueParseException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;

Expand All @@ -14,16 +14,6 @@ public InvalidFlagEnumValueParseException() : base()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="InvalidFlagEnumValueParseException"/> class with serialized data.
/// </summary>
/// <param name="info">The object that holds the serialized object data.</param>
/// <param name="context">The contextual information about the source or destination.</param>
protected InvalidFlagEnumValueParseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="InvalidFlagEnumValueParseException"/> class with a user specified error <paramref name="message"/>.
/// </summary>
Expand Down
12 changes: 1 addition & 11 deletions src/SmartEnum/Exceptions/NegativeValueArgumentException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;

Expand All @@ -17,16 +17,6 @@ public NegativeValueArgumentException() : base()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="NegativeValueArgumentException"/> class with serialized data.
/// </summary>
/// <param name="info">The object that holds the serialized object data.</param>
/// <param name="context">The contextual information about the source or destination.</param>
protected NegativeValueArgumentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="NegativeValueArgumentException"/> class with a specified error message.
/// </summary>
Expand Down
12 changes: 1 addition & 11 deletions src/SmartEnum/Exceptions/SmartEnumNotFoundException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Ardalis.SmartEnum
namespace Ardalis.SmartEnum
{
using System;

Expand All @@ -16,16 +16,6 @@ public SmartEnumNotFoundException()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="SmartEnumNotFoundException"/> class with serialized data.
/// </summary>
/// <param name="info">The object that holds the serialized object data.</param>
/// <param name="context">The contextual information about the source or destination.</param>
protected SmartEnumNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="SmartEnumNotFoundException"/> class with a specified error message.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;

Expand All @@ -14,16 +14,6 @@ public SmartFlagEnumContainsNegativeValueException() : base()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="SmartFlagEnumContainsNegativeValueException"/> class with serialized data.
/// </summary>
/// <param name="info">The object that holds the serialized object data.</param>
/// <param name="context">The contextual information about the source or destination.</param>
protected SmartFlagEnumContainsNegativeValueException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="SmartFlagEnumContainsNegativeValueException"/> class with a user specified error <paramref name="message"/>.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;

Expand All @@ -18,17 +18,6 @@ public SmartFlagEnumDoesNotContainPowerOfTwoValuesException()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="SmartFlagEnumDoesNotContainPowerOfTwoValuesException"/> class with serialized data.
/// </summary>
/// <param name="info">The object that holds the serialized object data.</param>
/// <param name="context">The contextual information about the source or destination.</param>
protected SmartFlagEnumDoesNotContainPowerOfTwoValuesException(
System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="SmartFlagEnumDoesNotContainPowerOfTwoValuesException"/> class with a specified error message.
/// </summary>
Expand Down
5 changes: 5 additions & 0 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<TargetFrameworks>net7.0;net6.0;net8.0;</TargetFrameworks>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<IsPackable>false</IsPackable>
<LangVersion>7.3</LangVersion>
<Features>strict</Features>
<TargetFrameworks>net6;net7;net8</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<RootNamespace>Ardalis.SmartEnum.Dapper.IntegrationTests</RootNamespace>
<TargetFrameworks>net6;net7;net8</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<RootNamespace>Ardalis.SmartEnum.Dapper.UnitTests</RootNamespace>
<TargetFrameworks>net6;net7;net8</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6;net7;net8</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<IsPackable>false</IsPackable>
<LangVersion>7.3</LangVersion>
<Features>strict</Features>
<TargetFrameworks>net6;net7;net8</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<IsPackable>false</IsPackable>
<LangVersion>7.3</LangVersion>
<Features>strict</Features>
<TargetFrameworks>net6;net7;net8</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<IsPackable>false</IsPackable>
<LangVersion>7.3</LangVersion>
<Features>strict</Features>
<TargetFrameworks>net6;net7;net8</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<Features>strict</Features>
<TargetFrameworks>net6;net7;net8</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion test/SmartEnum.UnitTests/SmartEnum.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<IsPackable>false</IsPackable>
<LangVersion>7.3</LangVersion>
<Features>strict</Features>
<TargetFrameworks>net6;net7;net8</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\SmartEnum\SmartEnum.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<IsPackable>false</IsPackable>
<LangVersion>7.3</LangVersion>
<Features>strict</Features>
<TargetFrameworks>net6;net7;net8</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\SmartEnum.Utf8Json\SmartEnum.Utf8Json.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<TargetFrameworks>net6;net7;net8</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 8712b03

Please sign in to comment.