Skip to content

Commit

Permalink
Try to migrate to .NET 8 (#101)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Viana <[email protected]>
  • Loading branch information
SebastianStehle and LSViana authored Aug 21, 2024
1 parent 14bc13d commit a61709a
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 26 deletions.
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)
: 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

0 comments on commit a61709a

Please sign in to comment.