Skip to content

Commit

Permalink
V4.0.0/prepare for launch (#27)
Browse files Browse the repository at this point in the history
📦 updated to centralized packages management (CPM)

⬆️ bump dependencies

💬 updated community health pages

🚨 ran code cleanup (fix formatting)
  • Loading branch information
gimlichael authored Nov 12, 2024
1 parent 41f42ca commit 551b251
Show file tree
Hide file tree
Showing 127 changed files with 1,042 additions and 1,013 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

For more details, please refer to `PackageReleaseNotes.txt` on a per assembly basis in the `.nuget` folder.

## [4.0.0] - TBD (sometime in November 2024)
## [4.0.0] - 2024-11-13

This major release is first and foremost focused on ironing out any wrinkles that have been introduced with .NET 9 preview releases so the final release is production ready together with the official launch from Microsoft.

Expand Down
20 changes: 10 additions & 10 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
</ItemGroup>

<ItemGroup Condition="'$(IsTestProject)' == 'false'">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="MinVer" Version="6.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="all" />
<PackageReference Include="MinVer" PrivateAssets="all" />
<None Include="..\..\.nuget\$(MSBuildProjectName)\icon.png" Pack="true" Visible="false" PackagePath="\" />
<None Include="..\..\.nuget\$(MSBuildProjectName)\README.md" Pack="true" PackagePath="\" />
</ItemGroup>
Expand All @@ -67,23 +67,23 @@
</PropertyGroup>

<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.10.0" Condition="$(TargetFramework.StartsWith('net4')) AND '$(IsLinux)' == 'true'" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.console" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Condition="$(TargetFramework.StartsWith('net4')) AND '$(IsLinux)' == 'true'" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.console" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PackageReference Include="coverlet.msbuild">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Codebelt.Extensions.Xunit.App" Version="9.0.0-preview.9" />
<PackageReference Include="Codebelt.Extensions.Xunit.App" />
</ItemGroup>

</Project>
50 changes: 50 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="AWSSDK.SQS" Version="3.7.400.47" />
<PackageVersion Include="AWSSDK.SimpleNotificationService" Version="3.7.400.47" />
<PackageVersion Include="Azure.Identity" Version="1.13.1" />
<PackageVersion Include="Azure.Messaging.EventGrid" Version="4.27.0" />
<PackageVersion Include="Azure.Storage.Queues" Version="12.20.1" />
<PackageVersion Include="Codebelt.Extensions.Newtonsoft.Json" Version="9.0.0-rc.1" />
<PackageVersion Include="Codebelt.Extensions.Xunit.App" Version="9.0.0-rc.1" />
<PackageVersion Include="Codebelt.Extensions.YamlDotNet" Version="9.0.0-rc.1" />
<PackageVersion Include="Cuemon.Extensions.Collections.Generic" Version="9.0.0-rc.1" />
<PackageVersion Include="Cuemon.Extensions.Core" Version="9.0.0-rc.1" />
<PackageVersion Include="Cuemon.Extensions.DependencyInjection" Version="9.0.0-rc.1" />
<PackageVersion Include="Cuemon.Extensions.IO" Version="9.0.0-rc.1" />
<PackageVersion Include="Cuemon.Extensions.Reflection" Version="9.0.0-rc.1" />
<PackageVersion Include="Cuemon.Extensions.Text.Json" Version="9.0.0-rc.1" />
<PackageVersion Include="Cuemon.Security.Cryptography" Version="9.0.0-rc.1" />
<PackageVersion Include="Dapper.StrongName" Version="2.1.35" />
<PackageVersion Include="DapperExtensions.StrongNameReference" Version="1.9.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.0-rc.2.24474.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Microsoft.TestPlatform.ObjectModel" Version="17.10.0" />
<PackageVersion Include="MinVer" Version="6.0.0" />
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
<PackageVersion Include="Xunit.Priority" Version="1.1.6" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.console" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net9'))">
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="9.0.0-rc.2.24474.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.0-rc.2.24474.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.0-rc.2.24474.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0-rc.2.24473.5" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net8'))">
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.8" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.8" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.8" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
</ItemGroup>
</Project>
8 changes: 4 additions & 4 deletions src/Savvyio.Commands.Messaging/InMemoryCommandQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public async Task SendAsync(IEnumerable<IMessage<ICommand>> messages, Action<Asy
var options = setup.Configure();
foreach (var command in messages)
{
await _channel.Writer.WriteAsync(command, options.CancellationToken).ConfigureAwait(false);
await _channel.Writer.WriteAsync(command, options.CancellationToken).ConfigureAwait(false);
}
}
}

/// <summary>
/// Receive one or more command(s) asynchronous using Point-to-Point Channel/P2P MEP.
Expand All @@ -40,8 +40,8 @@ public async IAsyncEnumerable<IMessage<ICommand>> ReceiveAsync(Action<AsyncOptio
var options = setup.Configure();
await foreach (var message in _channel.Reader.ReadAllAsync(options.CancellationToken).ConfigureAwait(false))
{
yield return message;
if (_channel.Reader.Count == 0) { yield break; }
yield return message;
if (_channel.Reader.Count == 0) { yield break; }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Savvyio.Core/Data/IPersistentDataStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Savvyio.Data
/// <seealso cref="IReadableDataStore{T}"/>
/// <seealso cref="IDeletableDataStore{T}"/>
/// <seealso cref="ISearchableDataStore{T,TOptions}"/>
public interface IPersistentDataStore<T, out TOptions> : IWritableDataStore<T>, IReadableDataStore<T>, ISearchableDataStore<T, TOptions>, IDeletableDataStore<T>
public interface IPersistentDataStore<T, out TOptions> : IWritableDataStore<T>, IReadableDataStore<T>, ISearchableDataStore<T, TOptions>, IDeletableDataStore<T>
where T : class
where TOptions : AsyncOptions, new()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Savvyio.Core/Data/ISearchableDataStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ namespace Savvyio.Data
/// <typeparam name="T">The type of the DTO.</typeparam>
/// <typeparam name="TOptions">The type of the options associated with this DTO.</typeparam>
/// <seealso cref="IDataStore{T}"/>
public interface ISearchableDataStore<T, out TOptions> : IDataStore<T>
where T : class
public interface ISearchableDataStore<T, out TOptions> : IDataStore<T>
where T : class
where TOptions : AsyncOptions, new()
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Savvyio.Core/Dispatchers/Dispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ protected Dispatcher(IServiceLocator serviceLocator)
/// Gets the function delegate that creates the services.
/// </summary>
/// <value>The function delegate that creates the services.</value>
protected Func<Type, IEnumerable<object>> ServiceFactory { get; }
protected Func<Type, IEnumerable<object>> ServiceFactory { get; }
}
}
4 changes: 2 additions & 2 deletions src/Savvyio.Core/Dispatchers/FireForgetDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected FireForgetDispatcher(IServiceLocator serviceLocator) : base(serviceLoc
/// <param name="request">The model that is being handled by a registered delegate.</param>
/// <param name="handlerFactory">The function delegate that will locate and invoke the handler registered to the specified <paramref name="request"/>.</param>
/// <remarks>A <paramref name="request"/> can be a command, domain event, integration event, query etc.</remarks>
protected virtual void Dispatch<TRequest, THandler>(TRequest request, Func<THandler, IFireForgetActivator<TRequest>> handlerFactory)
protected virtual void Dispatch<TRequest, THandler>(TRequest request, Func<THandler, IFireForgetActivator<TRequest>> handlerFactory)
where TRequest : IRequest
where THandler : IHandler<TRequest>
{
Expand Down Expand Up @@ -58,7 +58,7 @@ protected virtual void Dispatch<TRequest, THandler>(TRequest request, Func<THand
/// <param name="setup">The <see cref="AsyncOptions"/> which may be configured.</param>
/// <returns>A <see cref="Task"/> that represents the asynchronous operation.</returns>
/// <remarks>A <paramref name="request"/> can be a command, domain event, integration event, query etc.</remarks>
protected virtual async Task DispatchAsync<TRequest, THandler>(TRequest request, Func<THandler, IFireForgetActivator<TRequest>> handlerFactory, Action<AsyncOptions> setup)
protected virtual async Task DispatchAsync<TRequest, THandler>(TRequest request, Func<THandler, IFireForgetActivator<TRequest>> handlerFactory, Action<AsyncOptions> setup)
where TRequest : IRequest
where THandler : IHandler<TRequest>
{
Expand Down
2 changes: 1 addition & 1 deletion src/Savvyio.Core/Dispatchers/RequestReplyDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected RequestReplyDispatcher(IServiceLocator serviceLocator) : base(serviceL
/// <param name="handlerFactory">The function delegate that will locate and invoke the handler registered to the specified <paramref name="request"/>.</param>
/// <returns>The response of the request.</returns>
/// <remarks>A <paramref name="request"/> can be a command, domain event, integration event, query etc.</remarks>
protected virtual TResponse Dispatch<TRequest, THandler, TResponse>(TRequest request, Func<THandler, IRequestReplyActivator<TRequest>> handlerFactory)
protected virtual TResponse Dispatch<TRequest, THandler, TResponse>(TRequest request, Func<THandler, IRequestReplyActivator<TRequest>> handlerFactory)
where TRequest : IRequest
where THandler : IHandler<TRequest>
{
Expand Down
2 changes: 1 addition & 1 deletion src/Savvyio.Core/Domain/IDomainEventDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface IDomainEventDispatcher : IDispatcher
/// </summary>
/// <param name="request">The <see cref="IDomainEvent"/> to raise.</param>
void Raise(IDomainEvent request);

/// <summary>
/// Invokes any domain event handlers that is assigned to the specified event.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface IIntegrationEventDispatcher : IDispatcher
/// </summary>
/// <param name="request">The <see cref="IIntegrationEvent"/> to publish.</param>
void Publish(IIntegrationEvent request);

/// <summary>
/// Publishes the specified <paramref name="request"/> asynchronous using Fire-and-Forget/In-Only MEP.
/// </summary>
Expand Down
3 changes: 2 additions & 1 deletion src/Savvyio.Core/HandlerDiscoveryModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using System.Reflection;
using Cuemon.Extensions;
using Cuemon.Extensions.Runtime;

namespace Savvyio
{
Expand Down Expand Up @@ -116,7 +117,7 @@ public HandlerServiceAssemblyModel(Type handlerImplementationType)
/// </summary>
public IEnumerable<HandlerServiceTypeImplementationModel> Implementations { get; internal set; }
}

/// <summary>
/// Represents a model for handler service type implementations.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/Savvyio.Core/HandlerServicesDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Text;
using Cuemon;
using Cuemon.Extensions;
using Cuemon.Extensions.Runtime;

namespace Savvyio
{
Expand Down
2 changes: 1 addition & 1 deletion src/Savvyio.Core/Handlers/RequestReplyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal class RequestReplyManager<TModel> : IRequestReplyRegistry<TModel>, IReq
{
private readonly ConcurrentDictionary<Type, Func<TModel, object>> _handlers = new();
private readonly ConcurrentDictionary<Type, Func<TModel, CancellationToken, Task<object>>> _asyncHandlers = new();

public RequestReplyManager()
{
}
Expand Down
4 changes: 2 additions & 2 deletions src/Savvyio.Core/Messaging/Cryptography/ISignedMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
/// </summary>
/// <typeparam name="T">The type of the payload constraint to the <see cref="IRequest"/> interface.</typeparam>
public interface ISignedMessage<out T> : IMessage<T> where T : IRequest
{
{
/// <summary>
/// Gets the cryptographic signature of the message.
/// </summary>
/// <value>The cryptographic signature of the message.</value>
string Signature { get; }
}
}
}
2 changes: 1 addition & 1 deletion src/Savvyio.Core/MetadataDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public bool Remove(string key)
{
return _dictionary.Remove(key);
}

/// <summary>
/// Gets the value associated with the specified key.
/// </summary>
Expand Down
8 changes: 4 additions & 4 deletions src/Savvyio.Core/Savvyio.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cuemon.Security.Cryptography" Version="9.0.0-preview.10" />
<PackageReference Include="Cuemon.Extensions.Core" Version="9.0.0-preview.10" />
<PackageReference Include="Cuemon.Extensions.Collections.Generic" Version="9.0.0-preview.10" />
<PackageReference Include="Cuemon.Extensions.Reflection" Version="9.0.0-preview.10" />
<PackageReference Include="Cuemon.Security.Cryptography" />
<PackageReference Include="Cuemon.Extensions.Core" />
<PackageReference Include="Cuemon.Extensions.Collections.Generic" />
<PackageReference Include="Cuemon.Extensions.Reflection" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected CloudEvent()
/// <value>The value describing the type of event related to the originating occurrence.</value>
/// <remarks>https://github.com/cloudevents/spec/blob/main/cloudevents/spec.md#type</remarks>
public string Type { get; protected set; }

/// <summary>
/// Gets the time, expressed as the Coordinated Universal Time (UTC), of when the occurrence happened.
/// </summary>
Expand Down
6 changes: 3 additions & 3 deletions src/Savvyio.Extensions.Dapper/DapperDataStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ namespace Savvyio.Extensions.Dapper
/// <typeparam name="TOptions">The type of options associated with this DTO.</typeparam>
/// <seealso cref="Disposable"/>
/// <seealso cref="IPersistentDataStore{T,TOptions}" />
public abstract class DapperDataStore<T, TOptions> : Disposable, IPersistentDataStore<T, TOptions>
where T : class
public abstract class DapperDataStore<T, TOptions> : Disposable, IPersistentDataStore<T, TOptions>
where T : class
where TOptions : AsyncOptions, new()
{
/// <summary>
Expand All @@ -40,7 +40,7 @@ protected DapperDataStore(IDapperDataSource source)
/// <param name="setup">The <see cref="AsyncOptions"/> which may be configured.</param>
/// <returns>A <see cref="Task" /> that represents the asynchronous operation.</returns>
public abstract Task CreateAsync(T dto, Action<AsyncOptions> setup = null);

/// <summary>
/// Updates the specified <paramref name="dto"/> asynchronous in the associated <seealso cref="IDapperDataSource"/>.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapper.StrongName" Version="2.1.35" />
<PackageReference Include="Dapper.StrongName" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DapperExtensions.StrongNameReference" Version="1.9.0" />
<PackageReference Include="DapperExtensions.StrongNameReference" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public static class ServiceCollectionExtensions
public static IServiceCollection AddDapperDataSource(this IServiceCollection services, Action<DapperDataSourceOptions> dataSourceSetup, Action<ServiceOptions> serviceSetup = null)
{
return services
.AddDapperDataSource<DapperDataSource>(serviceSetup)
.AddConfiguredOptions(dataSourceSetup);
.AddDapperDataSource<DapperDataSource>(serviceSetup)
.AddConfiguredOptions(dataSourceSetup);
}

/// <summary>
Expand All @@ -37,8 +37,8 @@ public static IServiceCollection AddDapperDataSource(this IServiceCollection ser
public static IServiceCollection AddDapperDataSource<TMarker>(this IServiceCollection services, Action<DapperDataSourceOptions<TMarker>> dataSourceSetup, Action<ServiceOptions> serviceSetup = null)
{
return services
.AddDapperDataSource<DapperDataSource<TMarker>>(serviceSetup)
.AddConfiguredOptions(dataSourceSetup);
.AddDapperDataSource<DapperDataSource<TMarker>>(serviceSetup)
.AddConfiguredOptions(dataSourceSetup);
}

/// <summary>
Expand All @@ -64,7 +64,7 @@ public static IServiceCollection AddDapperDataSource<TService>(this IServiceColl
/// <typeparam name="T">The type of the DTO to use.</typeparam>
/// <param name="services">The <see cref="IServiceCollection" /> to add the service to.</param>
/// <returns>A reference to <paramref name="services" /> so that additional calls can be chained.</returns>
public static IServiceCollection AddDapperDataStore<TService, T>(this IServiceCollection services)
public static IServiceCollection AddDapperDataStore<TService, T>(this IServiceCollection services)
where TService : DapperDataStore<T, DapperQueryOptions>
where T : class
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static IServiceCollection AddDapperExtensionsDataStore<T>(this IServiceCo
/// <returns>A reference to <paramref name="services" /> so that additional calls can be chained.</returns>
public static IServiceCollection AddDapperExtensionsDataStore<T, TMarker>(this IServiceCollection services) where T : class
{
return services.AddDataStore<DapperExtensionsDataStore<T, TMarker>, T, DapperExtensionsQueryOptions<T>>();
return services.AddDataStore<DapperExtensionsDataStore<T, TMarker>, T, DapperExtensionsQueryOptions<T>>();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ namespace Savvyio.Extensions.DependencyInjection.Data
/// <seealso cref="IReadableDataStore{T,TMarker}"/>
/// <seealso cref="ISearchableDataStore{T,TOptions,TMarker}"/>
/// <seealso cref="IDeletableDataStore{T,TMarker}"/>
public interface IPersistentDataStore<T, out TOptions, TMarker> : IPersistentDataStore<T, TOptions>, IWritableDataStore<T, TMarker>, IReadableDataStore<T, TMarker>, ISearchableDataStore<T, TOptions, TMarker>, IDeletableDataStore<T, TMarker>
where T : class
public interface IPersistentDataStore<T, out TOptions, TMarker> : IPersistentDataStore<T, TOptions>, IWritableDataStore<T, TMarker>, IReadableDataStore<T, TMarker>, ISearchableDataStore<T, TOptions, TMarker>, IDeletableDataStore<T, TMarker>
where T : class
where TOptions : AsyncOptions, new()
{
}
Expand Down
Loading

0 comments on commit 551b251

Please sign in to comment.