aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-01-06 13:09:21 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2024-01-06 13:09:21 -0500
commit86c0532edc0042b26dda5f1ca41abdf80db46414 (patch)
treed415be3b7fcf06577e76ee8ff22a3c76c9b65387
parentc7cbe768eb153efd61568178b3b9d0b4f50e20a7 (diff)
initial migration to .net 8.0
-rw-r--r--README.md2
-rw-r--r--lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj4
-rw-r--r--lib/Hashing.Portable/tests/VNLib.Hashing.PortableTests.csproj2
-rw-r--r--lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj10
-rw-r--r--lib/Net.Compression/VNLib.Net.CompressionTests/VNLib.Net.CompressionTests.csproj2
-rw-r--r--lib/Net.Http/src/VNLib.Net.Http.csproj4
-rw-r--r--lib/Net.Messaging.FBM/src/Exceptions/FBMException.cs8
-rw-r--r--lib/Net.Messaging.FBM/src/Exceptions/InvalidResponseException.cs8
-rw-r--r--lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj4
-rw-r--r--lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj4
-rw-r--r--lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj4
-rw-r--r--lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj4
-rw-r--r--lib/Plugins.Essentials/src/Sessions/SessionException.cs7
-rw-r--r--lib/Plugins.Essentials/src/Users/UserCreationFailedException.cs5
-rw-r--r--lib/Plugins.Essentials/src/Users/UserExistsException.cs8
-rw-r--r--lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj4
-rw-r--r--lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj4
-rw-r--r--lib/Plugins.Runtime/src/LoaderExtensions.cs5
-rw-r--r--lib/Plugins.Runtime/src/PluginUnloadExcpetion.cs7
-rw-r--r--lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj4
-rw-r--r--lib/Plugins/src/VNLib.Plugins.csproj4
-rw-r--r--lib/Utils/README.md2
-rw-r--r--lib/Utils/src/ERRNO.cs10
-rw-r--r--lib/Utils/src/Extensions/StringExtensions.cs22
-rw-r--r--lib/Utils/src/Memory/MemoryUtil.cs12
-rw-r--r--lib/Utils/src/Resources/ResourceDeleteFailedException.cs5
-rw-r--r--lib/Utils/src/Resources/ResourceUpdateFailedException.cs6
-rw-r--r--lib/Utils/src/VNLib.Utils.csproj6
-rw-r--r--lib/Utils/tests/VNLib.UtilsTests.csproj2
29 files changed, 70 insertions, 99 deletions
diff --git a/README.md b/README.md
index abf5a13..e2cb063 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,8 @@ Again, go to my website below, my email address is available, go ahead and send
### .NET Version Notice
I prefer sticking with lts .NET versions and 8 just released, so I will likely be upgrading once its "stable" and I have the time to port and test everything. Core libraries will be first then downstream packages.
+**Update** Upgrades to .NET 8 have started and breaking changes/obsolete apis have been addressed. Futher updates and improvements will be made to make use of new features and apis.
+
## Index/NameSpaces
**VNLib.**
- [Utils](lib/Utils/#) - A mutli-use library focused on reducing complexity for working with native resources, memory, asynchronous patterns and data-structures, object/resource pooling, critical resource handling, and common logging abstractions.
diff --git a/lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj b/lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj
index 8caae03..7e31e0c 100644
--- a/lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj
+++ b/lib/Hashing.Portable/src/VNLib.Hashing.Portable.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<AssemblyName>VNLib.Hashing.Portable</AssemblyName>
<RootNamespace>VNLib.Hashing</RootNamespace>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
@@ -17,7 +17,7 @@
<Description>Provides managed and random cryptocraphic hashing helper classes, including complete Argon2 password hashing.</Description>
<Authors>Vaughn Nugent</Authors>
<Company>Vaughn Nugent</Company>
- <Copyright>Copyright © 2023 Vaughn Nugent</Copyright>
+ <Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
<PackageProjectUrl>https://www.vaughnnugent.com/resources/software/modules/VNLib.Core</PackageProjectUrl>
<RepositoryUrl>https://github.com/VnUgE/VNLib.Core/tree/main/lib/Hashing.Portable</RepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
diff --git a/lib/Hashing.Portable/tests/VNLib.Hashing.PortableTests.csproj b/lib/Hashing.Portable/tests/VNLib.Hashing.PortableTests.csproj
index 45a5589..e68b1a2 100644
--- a/lib/Hashing.Portable/tests/VNLib.Hashing.PortableTests.csproj
+++ b/lib/Hashing.Portable/tests/VNLib.Hashing.PortableTests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
diff --git a/lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj b/lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj
index c6a05cd..36082f1 100644
--- a/lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj
+++ b/lib/Net.Compression/VNLib.Net.Compression/VNLib.Net.Compression.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<RootNamespace>VNLib.Net.Compression</RootNamespace>
<AssemblyName>VNLib.Net.Compression</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -22,12 +22,8 @@
<Authors>Vaughn Nugent</Authors>
<Company>Vaughn Nugent</Company>
<Product>VNLib Native Http Compression Provider</Product>
- <Copyright>Copyright © 2023 Vaughn Nugent</Copyright>
- <Description>
- .NET/6.0 dynamically loadable managed wrapper library for loading vnlib_compress native library. It provides
- an implementation of the IHttpCompressorManager interface for use with the VNLib.Net.Http library and servers
- wishing to support dynamic response compression.
- </Description>
+ <Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
+ <Description>.NET/8.0 dynamically loadable managed wrapper library for loading vnlib_compress native library. It provides an implementation of the IHttpCompressorManager interface for use with the VNLib.Net.Http library and servers wishing to support dynamic response compression.</Description>
<PackageProjectUrl>https://www.vaughnnugent.com/resources/software/modules/VNLib.Core</PackageProjectUrl>
<RepositoryUrl>https://github.com/VnUgE/VNLib.Core/tree/main/lib/Net.Compression</RepositoryUrl>
</PropertyGroup>
diff --git a/lib/Net.Compression/VNLib.Net.CompressionTests/VNLib.Net.CompressionTests.csproj b/lib/Net.Compression/VNLib.Net.CompressionTests/VNLib.Net.CompressionTests.csproj
index 53a6155..97549db 100644
--- a/lib/Net.Compression/VNLib.Net.CompressionTests/VNLib.Net.CompressionTests.csproj
+++ b/lib/Net.Compression/VNLib.Net.CompressionTests/VNLib.Net.CompressionTests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
diff --git a/lib/Net.Http/src/VNLib.Net.Http.csproj b/lib/Net.Http/src/VNLib.Net.Http.csproj
index ea0bdb7..43224fe 100644
--- a/lib/Net.Http/src/VNLib.Net.Http.csproj
+++ b/lib/Net.Http/src/VNLib.Net.Http.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<RootNamespace>VNLib.Net.Http</RootNamespace>
<AssemblyName>VNLib.Net.Http</AssemblyName>
<NeutralLanguage>en-US</NeutralLanguage>
@@ -17,7 +17,7 @@
<Company>Vaughn Nugent</Company>
<Product>VNLib HTTP Library</Product>
<Description>Provides a high performance HTTP 0.9-1.1 application processing layer for handling transport *agnostic connections and asynchronous event support for applications serving HTTP requests such as web content. This library has a large focus on low/no GC allocations using unmanaged memory support provided by the VNLib.Utils library. No external dependencies outside of the VNLib ecosystem are required. The VNLib.Plugins and VNLib.Plugins.Essentials libraries are highly recommended for serving web content.</Description>
- <Copyright>Copyright © 2023 Vaughn Nugent</Copyright>
+ <Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
<PackageProjectUrl>https://www.vaughnnugent.com/resources/software/modules/VNLib.Core</PackageProjectUrl>
<RepositoryUrl>https://github.com/VnUgE/VNLib.Core/tree/main/lib/Net.Http</RepositoryUrl>
<PackageReadmeFile>readme.md</PackageReadmeFile>
diff --git a/lib/Net.Messaging.FBM/src/Exceptions/FBMException.cs b/lib/Net.Messaging.FBM/src/Exceptions/FBMException.cs
index 1d5c7db..1a047a9 100644
--- a/lib/Net.Messaging.FBM/src/Exceptions/FBMException.cs
+++ b/lib/Net.Messaging.FBM/src/Exceptions/FBMException.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2022 Vaughn Nugent
+* Copyright (c) 2024 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Net.Messaging.FBM
@@ -23,7 +23,7 @@
*/
using System;
-using System.Runtime.Serialization;
+
namespace VNLib.Net.Messaging.FBM
{
@@ -44,9 +44,5 @@ namespace VNLib.Net.Messaging.FBM
public FBMException(string message, Exception innerException) : base(message, innerException)
{
}
- ///<inheritdoc/>
- protected FBMException(SerializationInfo info, StreamingContext context) : base(info, context)
- {
- }
}
}
diff --git a/lib/Net.Messaging.FBM/src/Exceptions/InvalidResponseException.cs b/lib/Net.Messaging.FBM/src/Exceptions/InvalidResponseException.cs
index 3f0b970..3fb61fa 100644
--- a/lib/Net.Messaging.FBM/src/Exceptions/InvalidResponseException.cs
+++ b/lib/Net.Messaging.FBM/src/Exceptions/InvalidResponseException.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2022 Vaughn Nugent
+* Copyright (c) 2024 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Net.Messaging.FBM
@@ -23,7 +23,7 @@
*/
using System;
-using System.Runtime.Serialization;
+
namespace VNLib.Net.Messaging.FBM
{
@@ -44,9 +44,5 @@ namespace VNLib.Net.Messaging.FBM
public InvalidResponseException(string message, Exception innerException) : base(message, innerException)
{
}
- ///<inheritdoc/>
- protected InvalidResponseException(SerializationInfo info, StreamingContext context) : base(info, context)
- {
- }
}
}
diff --git a/lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj b/lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj
index 70a640d..667dfed 100644
--- a/lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj
+++ b/lib/Net.Messaging.FBM/src/VNLib.Net.Messaging.FBM.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<RootNamespace>VNLib.Net.Messaging.FBM</RootNamespace>
<AssemblyName>VNLib.Net.Messaging.FBM</AssemblyName>
<Nullable>enable</Nullable>
@@ -15,7 +15,7 @@
<Authors>Vaughn Nugent</Authors>
<Company>Vaughn Nugent</Company>
<Description>Fixed Buffer Messaging protocol class library. Implements a high-performance asynchronous request/response messaging architecture build on top of HTTP websockets. Provides client and server data structures.</Description>
- <Copyright>Copyright © 2023 Vaughn Nugent</Copyright>
+ <Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
<PackageProjectUrl>https://www.vaughnnugent.com/resources/software/modules/VNLib.Core</PackageProjectUrl>
<RepositoryUrl>https://github.com/VnUgE/VNLib.Core/tree/main/lib/Net.Messaging.FBM</RepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
diff --git a/lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj b/lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj
index d5ee1cf..c431fdd 100644
--- a/lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj
+++ b/lib/Net.Rest.Client/src/VNLib.Net.Rest.Client.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<AssemblyName>VNLib.Net.Rest.Client</AssemblyName>
<RootNamespace>VNLib.Net.Rest.Client</RootNamespace>
@@ -14,7 +14,7 @@
<PackageId>VNLib.Net.Rest.Client</PackageId>
<Company>Vaughn Nugent</Company>
<Authors>Vaughn Nugent</Authors>
- <Copyright>Copyright © 2023 Vaughn Nugent</Copyright>
+ <Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
<Description>Provides a RestClient connection pool using the Utils.ObjectRental framework for reusing RestClients with a common configuration to execute RestRequests against. This library also implements an OAuth2 authenticator for the RestSharp IAuthenticator using the client credentials method.</Description>
<PackageProjectUrl>https://www.vaughnnugent.com/resources/software/modules/VNLib.Core</PackageProjectUrl>
<RepositoryUrl>https://github.com/VnUgE/VNLib.Core/tree/main/lib/Net.Rest.Client</RepositoryUrl>
diff --git a/lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj b/lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj
index ac3e0a1..e8c28f1 100644
--- a/lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj
+++ b/lib/Net.Transport.SimpleTCP/src/VNLib.Net.Transport.SimpleTCP.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<RootNamespace>VNLib.Net.Transport</RootNamespace>
<AssemblyName>VNLib.Net.Transport.SimpleTCP</AssemblyName>
<Nullable>enable</Nullable>
@@ -18,7 +18,7 @@
<Description>Provides a library for single process asynchronous, event driven, TCP socket listening and supporting structures to implement simple high performance TCP servers with or without TLS security.</Description>
<Authors>Vaughn Nugent</Authors>
<Company>Vaughn Nugent</Company>
- <Copyright>Copyright © 2023 Vaughn Nugent</Copyright>
+ <Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
<PackageProjectUrl>https://www.vaughnnugent.com/resources/software/modules/VNLib.Core</PackageProjectUrl>
<RepositoryUrl>https://github.com/VnUgE/VNLib.Core/tree/main/lib/Net.Transport.SimpleTCP</RepositoryUrl>
</PropertyGroup>
diff --git a/lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj b/lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj
index 8fd7e77..792b168 100644
--- a/lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj
+++ b/lib/Plugins.Essentials.ServiceStack/src/VNLib.Plugins.Essentials.ServiceStack.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<RootNamespace>VNLib.Plugins.Essentials.ServiceStack</RootNamespace>
<AssemblyName>VNLib.Plugins.Essentials.ServiceStack</AssemblyName>
<Nullable>enable</Nullable>
@@ -15,7 +15,7 @@
<Authors>Vaughn Nugent</Authors>
<Company>Vaughn Nugent</Company>
<PackageId>VNLib.Plugins.Essentials.ServiceStack</PackageId>
- <Copyright>Copyright © 2023 Vaughn Nugent</Copyright>
+ <Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
<Description>
Provides data structures for building a dynamic HTTP servicing stack with runtime plugin loading,
dynamic endpoint routing, middleware* configuration, and multi-server managment.
diff --git a/lib/Plugins.Essentials/src/Sessions/SessionException.cs b/lib/Plugins.Essentials/src/Sessions/SessionException.cs
index 554c55f..384c97a 100644
--- a/lib/Plugins.Essentials/src/Sessions/SessionException.cs
+++ b/lib/Plugins.Essentials/src/Sessions/SessionException.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2022 Vaughn Nugent
+* Copyright (c) 2024 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Plugins.Essentials
@@ -23,7 +23,7 @@
*/
using System;
-using System.Runtime.Serialization;
+
namespace VNLib.Plugins.Essentials.Sessions
{
@@ -41,8 +41,5 @@ namespace VNLib.Plugins.Essentials.Sessions
///<inheritdoc/>
public SessionException(string message, Exception innerException) : base(message, innerException)
{}
- ///<inheritdoc/>
- protected SessionException(SerializationInfo info, StreamingContext context) : base(info, context)
- {}
}
}
diff --git a/lib/Plugins.Essentials/src/Users/UserCreationFailedException.cs b/lib/Plugins.Essentials/src/Users/UserCreationFailedException.cs
index 0c901f2..1469624 100644
--- a/lib/Plugins.Essentials/src/Users/UserCreationFailedException.cs
+++ b/lib/Plugins.Essentials/src/Users/UserCreationFailedException.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2023 Vaughn Nugent
+* Copyright (c) 2024 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Plugins.Essentials
@@ -23,7 +23,6 @@
*/
using System;
-using System.Runtime.Serialization;
using VNLib.Utils.Resources;
@@ -40,7 +39,5 @@ namespace VNLib.Plugins.Essentials.Users
{}
public UserCreationFailedException(string message, Exception innerException) : base(message, innerException)
{}
- protected UserCreationFailedException(SerializationInfo info, StreamingContext context) : base(info, context)
- {}
}
} \ No newline at end of file
diff --git a/lib/Plugins.Essentials/src/Users/UserExistsException.cs b/lib/Plugins.Essentials/src/Users/UserExistsException.cs
index e9b9586..3322c30 100644
--- a/lib/Plugins.Essentials/src/Users/UserExistsException.cs
+++ b/lib/Plugins.Essentials/src/Users/UserExistsException.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2023 Vaughn Nugent
+* Copyright (c) 2024 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Plugins.Essentials
@@ -23,7 +23,7 @@
*/
using System;
-using System.Runtime.Serialization;
+
namespace VNLib.Plugins.Essentials.Users
{
@@ -44,9 +44,5 @@ namespace VNLib.Plugins.Essentials.Users
///<inheritdoc/>
public UserExistsException(string message, Exception innerException) : base(message, innerException)
{ }
-
- ///<inheritdoc/>
- protected UserExistsException(SerializationInfo info, StreamingContext context) : base(info, context)
- { }
}
} \ No newline at end of file
diff --git a/lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj b/lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj
index 65fff58..9b8abb7 100644
--- a/lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj
+++ b/lib/Plugins.Essentials/src/VNLib.Plugins.Essentials.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<RootNamespace>VNLib.Plugins.Essentials</RootNamespace>
<AssemblyName>VNLib.Plugins.Essentials</AssemblyName>
<AnalysisLevel>latest-all</AnalysisLevel>
@@ -16,7 +16,7 @@
<Company>Vaughn NUgent</Company>
<PackageId>VNLib.Plugins.Essentials</PackageId>
<Product>VNLib Essentials Plugin Library</Product>
- <Copyright>Copyright © 2023 Vaughn Nugent</Copyright>
+ <Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
<Description>Provides essential web, sessions, users abstractions for building extensable web applications with satefull sessions, user based intraction with login and account security extensions.</Description>
<PackageTags>VNLib, Plugins, VNLib.Plugins.Essentials, Essentials, Essential Plugins, HTTP Essentials, OAuth2</PackageTags>
<PackageProjectUrl>https://www.vaughnnugent.com/resources/software/modules/VNLib.Core</PackageProjectUrl>
diff --git a/lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj b/lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj
index c7a8414..2b8eccd 100644
--- a/lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj
+++ b/lib/Plugins.PluginBase/src/VNLib.Plugins.PluginBase.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<RootNamespace>VNLib.Plugins</RootNamespace>
<AssemblyName>VNLib.Plugins.PluginBase</AssemblyName>
<AnalysisLevel>latest-all</AnalysisLevel>
@@ -13,7 +13,7 @@
<Authors>Vaughn Nugent</Authors>
<Company>Vaughn Nugent</Company>
<PackageId>VNLib.Plugins.PluginBase</PackageId>
- <Copyright>Copyright © 2023 Vaughn Nugent</Copyright>
+ <Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
<Description>A base class for VNLib.Plugins that provides all supported loading functionalities, with built-in logging, loading, task-managment and endpoint routing.</Description>
<PackageProjectUrl>https://www.vaughnnugent.com/resources/software/modules/VNLib.Core</PackageProjectUrl>
<RepositoryUrl>https://github.com/VnUgE/VNLib.Core/tree/main/lib/Plugins.PluginBase</RepositoryUrl>
diff --git a/lib/Plugins.Runtime/src/LoaderExtensions.cs b/lib/Plugins.Runtime/src/LoaderExtensions.cs
index b892213..e88ccb3 100644
--- a/lib/Plugins.Runtime/src/LoaderExtensions.cs
+++ b/lib/Plugins.Runtime/src/LoaderExtensions.cs
@@ -56,7 +56,6 @@ namespace VNLib.Plugins.Runtime
private sealed class TypedRegistration<T> : IPluginEventListener where T: class
{
private readonly ITypedPluginConsumer<T> _consumerEvents;
- private readonly object? _userState;
private T? _service;
private readonly Type _type;
@@ -77,7 +76,7 @@ namespace VNLib.Plugins.Runtime
.First();
//Call load with the exported type
- _consumerEvents.OnLoad(service, _userState);
+ _consumerEvents.OnLoad(service, state);
//Store for unload
_service = service;
@@ -86,7 +85,7 @@ namespace VNLib.Plugins.Runtime
public void OnPluginUnloaded(PluginController controller, object? state)
{
//Unload
- _consumerEvents.OnUnload(_service!, _userState);
+ _consumerEvents.OnUnload(_service!, state);
_service = null;
}
}
diff --git a/lib/Plugins.Runtime/src/PluginUnloadExcpetion.cs b/lib/Plugins.Runtime/src/PluginUnloadExcpetion.cs
index c961b4e..b1a3819 100644
--- a/lib/Plugins.Runtime/src/PluginUnloadExcpetion.cs
+++ b/lib/Plugins.Runtime/src/PluginUnloadExcpetion.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2023 Vaughn Nugent
+* Copyright (c) 2024 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Plugins.Runtime
@@ -23,7 +23,7 @@
*/
using System;
-using System.Runtime.Serialization;
+
namespace VNLib.Plugins.Runtime
{
@@ -42,8 +42,5 @@ namespace VNLib.Plugins.Runtime
public PluginUnloadException(string message, Exception innerException) : base(message, innerException)
{ }
-
- protected PluginUnloadException(SerializationInfo info, StreamingContext context) : base(info, context)
- { }
}
}
diff --git a/lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj b/lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj
index c3e58f3..30f2106 100644
--- a/lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj
+++ b/lib/Plugins.Runtime/src/VNLib.Plugins.Runtime.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<Nullable>enable</Nullable>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<RootNamespace>VNLib.Plugins.Runtime</RootNamespace>
<AssemblyName>VNLib.Plugins.Runtime</AssemblyName>
<AnalysisLevel>latest-all</AnalysisLevel>
@@ -14,7 +14,7 @@
<Authors>Vaughn Nugent</Authors>
<Company>Vaughn Nugent</Company>
<PackageId>VNLib.Plugins.Runtime</PackageId>
- <Copyright>Copyright © 2023 Vaughn Nugent</Copyright>
+ <Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
<Description>A runtime plugin loader for .NET. Allows runtime loading and tracking of .NET assemblies that export the VNLib.Plugin.IPlugin interface.</Description>
<PackageProjectUrl>https://www.vaughnnugent.com/resources/software/modules/VNLib.Core</PackageProjectUrl>
<RepositoryUrl>https://github.com/VnUgE/VNLib.Core/tree/main/lib/Plugins.Runtime</RepositoryUrl>
diff --git a/lib/Plugins/src/VNLib.Plugins.csproj b/lib/Plugins/src/VNLib.Plugins.csproj
index 05f57d3..21fb203 100644
--- a/lib/Plugins/src/VNLib.Plugins.csproj
+++ b/lib/Plugins/src/VNLib.Plugins.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<RootNamespace>VNLib.Plugins</RootNamespace>
<AssemblyName>VNLib.Plugins</AssemblyName>
<Nullable>enable</Nullable>
@@ -14,7 +14,7 @@
<Authors>Vaughn Nugent</Authors>
<Company>Vaughn Nugent</Company>
<PackageId>VNLib.Plugins</PackageId>
- <Copyright>Copyright © 2023 Vaughn Nugent</Copyright>
+ <Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
<PackageTags>Plugins, VNLIb, VNLib Plugins, Plugin Base</PackageTags>
<Product>VNLib Plugins Interface Assembly</Product>
<Description>Provides a standard interface for building dynamically loadable plugins and asynchronus web endpoint processing, compatible with the VNLib.Plugins.Runtime loader library.
diff --git a/lib/Utils/README.md b/lib/Utils/README.md
index f5b1244..341b1d4 100644
--- a/lib/Utils/README.md
+++ b/lib/Utils/README.md
@@ -1,6 +1,6 @@
# VNLib.Utils
-A .NET 6 /C# library for common .NET operation and memory optimizations.
+A .NET 8 /C# library for common .NET operation and memory optimizations.
### Builds & Feeds
Builds contain the individual components listed below packaged per-project, available for download on my website. Build packages will be tgz archives (except for nuget packages). You can obtain debug and release builds, along with per-project source code.
diff --git a/lib/Utils/src/ERRNO.cs b/lib/Utils/src/ERRNO.cs
index 3bc1296..2a59ba6 100644
--- a/lib/Utils/src/ERRNO.cs
+++ b/lib/Utils/src/ERRNO.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2023 Vaughn Nugent
+* Copyright (c) 2024 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Utils
@@ -85,13 +85,7 @@ namespace VNLib.Utils
/// C style boolean conversion. false if 0, true otherwise
/// </summary>
/// <param name="errorVal"></param>
- public static implicit operator bool(ERRNO errorVal) => errorVal != 0;
-
- /// <summary>
- /// Creates a new <see cref="IntPtr"/> from the value if the stored (nint) error code
- /// </summary>
- /// <param name="errno">The <see cref="ERRNO"/> contating the pointer value</param>
- public static implicit operator IntPtr(ERRNO errno) => new(errno.ErrorCode);
+ public static implicit operator bool(ERRNO errorVal) => errorVal != 0;
/// <summary>
/// Creates a new <c>nint</c> from the value if the stored error code
diff --git a/lib/Utils/src/Extensions/StringExtensions.cs b/lib/Utils/src/Extensions/StringExtensions.cs
index 42b7b32..7ffaaa2 100644
--- a/lib/Utils/src/Extensions/StringExtensions.cs
+++ b/lib/Utils/src/Extensions/StringExtensions.cs
@@ -475,10 +475,10 @@ namespace VNLib.Utils.Extensions
{
Span<char> buffer = writer.AsSpan();
- //If the search and replacment parameters are the same length
+ //If the search and replacement parameters are the same length
if (search.Length == replace.Length)
{
- buffer.ReplaceInPlace(search, replace);
+ ReplaceInPlace(buffer, search, replace);
return;
}
@@ -490,24 +490,28 @@ namespace VNLib.Utils.Extensions
return;
}
- //Replacment might be empty
- writer.Reset();
+ //Init new writer over the buffer
+ ForwardOnlyWriter<char> writer2 = new(buffer);
do
{
- //Append the data before the split character
- writer.Append(buffer[..start]);
+ //Append the data before the search chars
+ writer2.Append(buffer[..start]);
//Append the replacment
- writer.Append(replace);
+ writer2.Append(replace);
//Shift buffer to the end of the
buffer = buffer[(start + searchLen)..];
- //search for next index
+ //search for next index beyond current index
start = buffer.IndexOf(search);
} while (start > -1);
//Write remaining data
- writer.Append(replace);
+ writer2.Append(replace);
+
+ //Reset writer1 and advance it to the end of writer2
+ writer.Reset();
+ writer.Advance(writer2.Written);
}
/// <summary>
diff --git a/lib/Utils/src/Memory/MemoryUtil.cs b/lib/Utils/src/Memory/MemoryUtil.cs
index 02d2f0e..1e0d11a 100644
--- a/lib/Utils/src/Memory/MemoryUtil.cs
+++ b/lib/Utils/src/Memory/MemoryUtil.cs
@@ -280,12 +280,12 @@ namespace VNLib.Utils.Memory
{
Debug.Assert(Unsafe.IsNullRef(ref src) == false, "Null reference passed to ZeroByRef");
- //Convert to bytes
- uint byteSize = ByteCount<T>(elements);
- ref byte byteRef = ref Unsafe.As<T, byte>(ref src);
-
- //Call init block
- Unsafe.InitBlock(ref byteRef, 0, byteSize);
+ //Call init block on bytes
+ Unsafe.InitBlock(
+ ref Refs.AsByte(ref src, 0),
+ 0,
+ ByteCount<T>(elements)
+ );
}
/*
diff --git a/lib/Utils/src/Resources/ResourceDeleteFailedException.cs b/lib/Utils/src/Resources/ResourceDeleteFailedException.cs
index 8e796b5..499442c 100644
--- a/lib/Utils/src/Resources/ResourceDeleteFailedException.cs
+++ b/lib/Utils/src/Resources/ResourceDeleteFailedException.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2022 Vaughn Nugent
+* Copyright (c) 2024 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Utils
@@ -23,7 +23,7 @@
*/
using System;
-using System.Runtime.Serialization;
+
namespace VNLib.Utils.Resources
{
@@ -35,6 +35,5 @@ namespace VNLib.Utils.Resources
public ResourceDeleteFailedException() { }
public ResourceDeleteFailedException(string message) : base(message) { }
public ResourceDeleteFailedException(string message, Exception innerException) : base(message, innerException) { }
- protected ResourceDeleteFailedException(SerializationInfo info, StreamingContext context) : base(info, context) { }
}
} \ No newline at end of file
diff --git a/lib/Utils/src/Resources/ResourceUpdateFailedException.cs b/lib/Utils/src/Resources/ResourceUpdateFailedException.cs
index b4b2b3a..447dc2e 100644
--- a/lib/Utils/src/Resources/ResourceUpdateFailedException.cs
+++ b/lib/Utils/src/Resources/ResourceUpdateFailedException.cs
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2022 Vaughn Nugent
+* Copyright (c) 2024 Vaughn Nugent
*
* Library: VNLib
* Package: VNLib.Utils
@@ -23,7 +23,6 @@
*/
using System;
-using System.Runtime.Serialization;
namespace VNLib.Utils.Resources
{
@@ -35,6 +34,5 @@ namespace VNLib.Utils.Resources
public ResourceUpdateFailedException() { }
public ResourceUpdateFailedException(string message) : base(message) { }
public ResourceUpdateFailedException(string message, Exception innerException) : base(message, innerException) { }
- protected ResourceUpdateFailedException(SerializationInfo info, StreamingContext context) : base(info, context) { }
}
-} \ No newline at end of file
+}
diff --git a/lib/Utils/src/VNLib.Utils.csproj b/lib/Utils/src/VNLib.Utils.csproj
index d121183..54199e0 100644
--- a/lib/Utils/src/VNLib.Utils.csproj
+++ b/lib/Utils/src/VNLib.Utils.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<RootNamespace>VNLib.Utils</RootNamespace>
<AssemblyName>VNLib.Utils</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -16,8 +16,8 @@
<Authors>Vaughn Nugent</Authors>
<Company>Vaughn Nugent</Company>
<Product>VNLib Utilities Library</Product>
- <Copyright>Copyright © 2023 Vaughn Nugent</Copyright>
- <Description>.NET/6.0 Utilities library for high-performance common operations. Utilities and abstractions for building and diagnosing native memory implementations. Dyanmic native library loading, IO, extensions, data encoding, resource access, and asynchronous cooperation primitives.</Description>
+ <Copyright>Copyright © 2024 Vaughn Nugent</Copyright>
+ <Description>.NET/8.0 Utilities library for high-performance common operations. Utilities and abstractions for building and diagnosing native memory implementations. Dyanmic native library loading, IO, extensions, data encoding, resource access, and asynchronous cooperation primitives.</Description>
<PackageProjectUrl>https://www.vaughnnugent.com/resources/software/modules/VNLib.Core</PackageProjectUrl>
<RepositoryUrl>https://github.com/VnUgE/VNLib.Core/tree/main/lib/Utils</RepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
diff --git a/lib/Utils/tests/VNLib.UtilsTests.csproj b/lib/Utils/tests/VNLib.UtilsTests.csproj
index f8cb807..6a8a065 100644
--- a/lib/Utils/tests/VNLib.UtilsTests.csproj
+++ b/lib/Utils/tests/VNLib.UtilsTests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>