Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messaging: Add net9.0 target + remove legacy serialization support ctor #733

Merged
merged 2 commits into from
Jan 28, 2025
Merged
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
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ jobs:
platform: [ windows-latest, ubuntu-latest, macos-14 ]
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core 8.0
- name: Setup .NET 8.0 and 9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: |
8.0.x
9.0.x
- name: Install dependencies
run: dotnet restore Messaging.sln
- name: Build
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Checkout repository
uses: actions/checkout@v4

Expand All @@ -52,9 +58,7 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
# - run: dotnet build Messaging.sln

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .github/workflows/nuget-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core 8.0
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Build
run: |
dotnet pack "./src/Helsenorge.Messaging/Helsenorge.Messaging.csproj" -c Release
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,5 @@ public HeaderValidationException(string message) : base(message)
public HeaderValidationException(string message, Exception inner) : base(message, inner)
{
}

protected HeaderValidationException(
SerializationInfo info,
StreamingContext context) : base(info, context)
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,5 @@ public ReceivedDataMismatchException(string message) : base(message) { }
/// <param name="message"></param>
/// <param name="inner"></param>
public ReceivedDataMismatchException(string message, Exception inner) : base(message, inner) { }
/// <summary>
/// Constructor
/// </summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected ReceivedDataMismatchException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context) { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,5 @@ public UnsupportedMessageException(string message) : base(message)
public UnsupportedMessageException(string message, Exception innerException) : base(message, innerException)
{
}

/// <summary>Initializes a new instance of the <see cref="UnsupportedMessageException" /> class with serialized data.</summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="info" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is <see langword="null" /> or <see cref="P:System.Exception.HResult" /> is zero (0).</exception>
protected UnsupportedMessageException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}
10 changes: 0 additions & 10 deletions src/Helsenorge.Messaging/Amqp/ReportableErrorException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,5 @@ public NotifySenderException(string message) : base(message) { }
/// <param name="message"></param>
/// <param name="inner"></param>
public NotifySenderException(string message, Exception inner) : base(message, inner) { }
/// <summary>
///
/// </summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected NotifySenderException(
SerializationInfo info,
StreamingContext context)
: base(info, context) { }

}
}
2 changes: 1 addition & 1 deletion src/Helsenorge.Messaging/Helsenorge.Messaging.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0;net8.0;net9.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<AssemblyName>Helsenorge.Messaging</AssemblyName>
<RootNamespace>Helsenorge.Messaging</RootNamespace>
Expand Down
4 changes: 2 additions & 2 deletions src/Helsenorge.Registries/Helsenorge.Registries.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0;net8.0;net9.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<AssemblyName>Helsenorge.Registries</AssemblyName>
<RootNamespace>Helsenorge.Registries</RootNamespace>
Expand Down Expand Up @@ -38,7 +38,7 @@
<PackageReference Include="System.ServiceModel.Security" Version="6.0.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
<PackageReference Include="System.ServiceModel.Http" Version="8.1.1" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="8.1.1" />
<PackageReference Include="System.ServiceModel.Security" Version="6.0.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<AssemblyName>Helsenorge.Messaging.Tests</AssemblyName>
<RootNamespace>Helsenorge.Messaging.Tests</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<AssemblyName>Helsenorge.Registries.Tests</AssemblyName>
<RootNamespace>Helsenorge.Registries.Tests</RootNamespace>
<ProjectGuid>{0DD35E31-7384-4F3D-BBE0-366993DC2307}</ProjectGuid>
Expand Down
Loading