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

Try to migrate to .NET 8 #101

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion Demo/Demo.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Tests/YDotNet.Tests.Driver/YDotNet.Tests.Driver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</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>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Tests/YDotNet.Tests.Unit/YDotNet.Tests.Unit.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<StartupObject>YDotNet.Tests.Unit.Program</StartupObject>
Expand Down
2 changes: 1 addition & 1 deletion YDotNet.Extensions/YDotNet.Extensions.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion YDotNet.Server.MongoDB/MongoDocumentStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public sealed class MongoDocumentStorage : IDocumentStorage, IHostedService
private readonly IMongoClient mongoClient;
private IMongoCollection<DocumentEntity>? collection;

public Func<DateTime> Clock = () => DateTime.UtcNow;
public Func<DateTime> Clock { get; set; } = () => DateTime.UtcNow;

public MongoDocumentStorage(IMongoClient mongoClient, IOptions<MongoDocumentStorageOptions> options)
{
Expand Down
2 changes: 1 addition & 1 deletion YDotNet.Server.MongoDB/YDotNet.Server.MongoDB.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion YDotNet.Server.Redis/YDotNet.Server.Redis.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion YDotNet.Server.WebSockets/YDotNet.Server.WebSockets.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions YDotNet.Server.WebSockets/YDotNetWebSocketOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace YDotNet.Server.WebSockets;

#pragma warning disable MA0048 // File name must match type name
public delegate Task AuthDelegate(HttpContext httpContext, DocumentContext context);
#pragma warning restore MA0048 // File name must match type name

public sealed class YDotNetWebSocketOptions
{
Expand Down
1 change: 1 addition & 0 deletions YDotNet.Server/DefaultDocumentCleaner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
var now = Clock();

var timeSinceLastLogging = now - lastLogging;

// We run this loop very often. If there is an exception, it could flood the log with duplicate log entries.
if (timeSinceLastLogging < options.LogWaitTime)
{
Expand Down
2 changes: 1 addition & 1 deletion YDotNet.Server/YDotNet.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion YDotNet/YDotNet.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
11 changes: 0 additions & 11 deletions YDotNet/YDotNetException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ namespace YDotNet;
/// <summary>
/// Represents an YDotNetException.
/// </summary>
[Serializable]
public class YDotNetException : Exception
{
/// <summary>
Expand Down Expand Up @@ -33,14 +32,4 @@ public YDotNetException(string message, Exception inner)
: base(message, inner)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="YDotNetException"/> class for serialization.
/// </summary>
/// <param name="info">The serialization info.</param>
/// <param name="context">The serialization context.</param>
protected YDotNetException(SerializationInfo info, StreamingContext context)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SebastianStehle Is this needed to migrate to .NET 8?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BinaryFormatter is obsolete now.

: base(info, context)
{
}
}
2 changes: 1 addition & 1 deletion native/YDotNet.Native.Linux/YDotNet.Native.Linux.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion native/YDotNet.Native.MacOS/YDotNet.Native.MacOS.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion native/YDotNet.Native.Win32/YDotNet.Native.Win32.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion native/YDotNet.Native/YDotNet.Native.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Loading