From 92134842bcb051c9a1837729773880bd0896462f Mon Sep 17 00:00:00 2001 From: Charles d'Avernas Date: Sun, 8 Sep 2024 10:30:47 +0200 Subject: [PATCH] fix(Solution): Updated all packages to latest version --- .../Neuroglia.Blazor.Dagre.csproj | 4 ++-- ...euroglia.Data.Expressions.JavaScript.csproj | 2 +- ...rastructure.EventSourcing.EventStore.csproj | 6 +++--- ...a.Infrastructure.EventSourcing.Redis.csproj | 2 +- .../Neuroglia.Data.Infrastructure.Mongo.csproj | 2 +- ...a.Infrastructure.ObjectStorage.Minio.csproj | 2 +- .../Services/MinioObjectStorage.cs | 3 ++- .../Neuroglia.Data.Infrastructure.Redis.csproj | 2 +- ...ucture.ResourceOriented.Abstractions.csproj | 4 ++-- ...nfrastructure.ResourceOriented.Redis.csproj | 2 +- .../Neuroglia.Data.PatchModel.csproj | 4 ++-- .../Neuroglia.Data.Schemas.Json.csproj | 2 +- ....Eventing.CloudEvents.Infrastructure.csproj | 2 +- src/Neuroglia.Plugins/Neuroglia.Plugins.csproj | 6 +++--- .../Neuroglia.Serialization.csproj | 2 +- .../Neuroglia.Serialization.YamlDotNet.csproj | 4 ++-- .../Services/DateTimeOffsetSerializer.cs | 4 ++-- .../Services/EquatableDictionarySerializer.cs | 4 ++-- .../Services/EquatableListSerializer.cs | 4 ++-- .../Services/JsonNodeTypeConverter.cs | 18 +++++------------- .../Services/JsonObjectDeserializer.cs | 8 ++++---- .../Services/JsonSchemaDeserializer.cs | 8 ++++---- .../Services/JsonSchemaTypeConverter.cs | 6 +++--- .../Services/StringEnumDeserializer.cs | 6 +++--- .../Services/StringEnumSerializer.cs | 4 ++-- .../Services/UriTypeSerializer.cs | 4 ++-- .../EventSourcing/EventStoreTestsBase.cs | 1 - .../Neuroglia.UnitTests.csproj | 8 ++++---- 28 files changed, 58 insertions(+), 66 deletions(-) diff --git a/src/Neuroglia.Blazor.Dagre/Neuroglia.Blazor.Dagre.csproj b/src/Neuroglia.Blazor.Dagre/Neuroglia.Blazor.Dagre.csproj index ce421cc94..43e685ac8 100644 --- a/src/Neuroglia.Blazor.Dagre/Neuroglia.Blazor.Dagre.csproj +++ b/src/Neuroglia.Blazor.Dagre/Neuroglia.Blazor.Dagre.csproj @@ -44,8 +44,8 @@ - - + + \ No newline at end of file diff --git a/src/Neuroglia.Data.Expressions.JavaScript/Neuroglia.Data.Expressions.JavaScript.csproj b/src/Neuroglia.Data.Expressions.JavaScript/Neuroglia.Data.Expressions.JavaScript.csproj index d876fb6da..81fa9cb9a 100644 --- a/src/Neuroglia.Data.Expressions.JavaScript/Neuroglia.Data.Expressions.JavaScript.csproj +++ b/src/Neuroglia.Data.Expressions.JavaScript/Neuroglia.Data.Expressions.JavaScript.csproj @@ -29,7 +29,7 @@ - + diff --git a/src/Neuroglia.Data.Infrastructure.EventSourcing.EventStore/Neuroglia.Data.Infrastructure.EventSourcing.EventStore.csproj b/src/Neuroglia.Data.Infrastructure.EventSourcing.EventStore/Neuroglia.Data.Infrastructure.EventSourcing.EventStore.csproj index 9e9d3bb3f..20c02a490 100644 --- a/src/Neuroglia.Data.Infrastructure.EventSourcing.EventStore/Neuroglia.Data.Infrastructure.EventSourcing.EventStore.csproj +++ b/src/Neuroglia.Data.Infrastructure.EventSourcing.EventStore/Neuroglia.Data.Infrastructure.EventSourcing.EventStore.csproj @@ -29,9 +29,9 @@ - - - + + + diff --git a/src/Neuroglia.Data.Infrastructure.EventSourcing.Redis/Neuroglia.Data.Infrastructure.EventSourcing.Redis.csproj b/src/Neuroglia.Data.Infrastructure.EventSourcing.Redis/Neuroglia.Data.Infrastructure.EventSourcing.Redis.csproj index 41567de2b..0145962ac 100644 --- a/src/Neuroglia.Data.Infrastructure.EventSourcing.Redis/Neuroglia.Data.Infrastructure.EventSourcing.Redis.csproj +++ b/src/Neuroglia.Data.Infrastructure.EventSourcing.Redis/Neuroglia.Data.Infrastructure.EventSourcing.Redis.csproj @@ -30,7 +30,7 @@ - + diff --git a/src/Neuroglia.Data.Infrastructure.Mongo/Neuroglia.Data.Infrastructure.Mongo.csproj b/src/Neuroglia.Data.Infrastructure.Mongo/Neuroglia.Data.Infrastructure.Mongo.csproj index 4a3523708..ef606323b 100644 --- a/src/Neuroglia.Data.Infrastructure.Mongo/Neuroglia.Data.Infrastructure.Mongo.csproj +++ b/src/Neuroglia.Data.Infrastructure.Mongo/Neuroglia.Data.Infrastructure.Mongo.csproj @@ -32,7 +32,7 @@ - + diff --git a/src/Neuroglia.Data.Infrastructure.ObjectStorage.Minio/Neuroglia.Data.Infrastructure.ObjectStorage.Minio.csproj b/src/Neuroglia.Data.Infrastructure.ObjectStorage.Minio/Neuroglia.Data.Infrastructure.ObjectStorage.Minio.csproj index 8dc170ae8..a8c5ad291 100644 --- a/src/Neuroglia.Data.Infrastructure.ObjectStorage.Minio/Neuroglia.Data.Infrastructure.ObjectStorage.Minio.csproj +++ b/src/Neuroglia.Data.Infrastructure.ObjectStorage.Minio/Neuroglia.Data.Infrastructure.ObjectStorage.Minio.csproj @@ -29,7 +29,7 @@ - + diff --git a/src/Neuroglia.Data.Infrastructure.ObjectStorage.Minio/Services/MinioObjectStorage.cs b/src/Neuroglia.Data.Infrastructure.ObjectStorage.Minio/Services/MinioObjectStorage.cs index 2ef8c6152..3f08b8662 100644 --- a/src/Neuroglia.Data.Infrastructure.ObjectStorage.Minio/Services/MinioObjectStorage.cs +++ b/src/Neuroglia.Data.Infrastructure.ObjectStorage.Minio/Services/MinioObjectStorage.cs @@ -13,6 +13,7 @@ using Microsoft.Extensions.Logging; using Minio; +using Minio.ApiEndpoints; using Minio.DataModel; using Minio.DataModel.Args; using Minio.DataModel.Tags; @@ -170,7 +171,7 @@ public virtual async IAsyncEnumerable ListObjectsAsync(string .WithBucket(bucketName) .WithRecursive(true); if (!string.IsNullOrWhiteSpace(prefix)) args = args.WithPrefix(prefix); - items = this.MinioClient.ListObjectsAsync(args, cancellationToken).ToAsyncEnumerable(); + items = this.MinioClient.ListObjectsEnumAsync(args, cancellationToken); } catch (MinioException ex) { diff --git a/src/Neuroglia.Data.Infrastructure.Redis/Neuroglia.Data.Infrastructure.Redis.csproj b/src/Neuroglia.Data.Infrastructure.Redis/Neuroglia.Data.Infrastructure.Redis.csproj index 1f8c454aa..3437b3f2a 100644 --- a/src/Neuroglia.Data.Infrastructure.Redis/Neuroglia.Data.Infrastructure.Redis.csproj +++ b/src/Neuroglia.Data.Infrastructure.Redis/Neuroglia.Data.Infrastructure.Redis.csproj @@ -32,7 +32,7 @@ - + diff --git a/src/Neuroglia.Data.Infrastructure.ResourceOriented.Abstractions/Neuroglia.Data.Infrastructure.ResourceOriented.Abstractions.csproj b/src/Neuroglia.Data.Infrastructure.ResourceOriented.Abstractions/Neuroglia.Data.Infrastructure.ResourceOriented.Abstractions.csproj index ff240261b..9571311e5 100644 --- a/src/Neuroglia.Data.Infrastructure.ResourceOriented.Abstractions/Neuroglia.Data.Infrastructure.ResourceOriented.Abstractions.csproj +++ b/src/Neuroglia.Data.Infrastructure.ResourceOriented.Abstractions/Neuroglia.Data.Infrastructure.ResourceOriented.Abstractions.csproj @@ -42,11 +42,11 @@ - + - + diff --git a/src/Neuroglia.Data.Infrastructure.ResourceOriented.Redis/Neuroglia.Data.Infrastructure.ResourceOriented.Redis.csproj b/src/Neuroglia.Data.Infrastructure.ResourceOriented.Redis/Neuroglia.Data.Infrastructure.ResourceOriented.Redis.csproj index 1d08ea9ee..69022ac73 100644 --- a/src/Neuroglia.Data.Infrastructure.ResourceOriented.Redis/Neuroglia.Data.Infrastructure.ResourceOriented.Redis.csproj +++ b/src/Neuroglia.Data.Infrastructure.ResourceOriented.Redis/Neuroglia.Data.Infrastructure.ResourceOriented.Redis.csproj @@ -29,7 +29,7 @@ - + diff --git a/src/Neuroglia.Data.PatchModel/Neuroglia.Data.PatchModel.csproj b/src/Neuroglia.Data.PatchModel/Neuroglia.Data.PatchModel.csproj index fa2b9048b..3841dc2a7 100644 --- a/src/Neuroglia.Data.PatchModel/Neuroglia.Data.PatchModel.csproj +++ b/src/Neuroglia.Data.PatchModel/Neuroglia.Data.PatchModel.csproj @@ -31,8 +31,8 @@ - - + + diff --git a/src/Neuroglia.Data.Schemas.Json/Neuroglia.Data.Schemas.Json.csproj b/src/Neuroglia.Data.Schemas.Json/Neuroglia.Data.Schemas.Json.csproj index 0ebc8a047..ff3707a50 100644 --- a/src/Neuroglia.Data.Schemas.Json/Neuroglia.Data.Schemas.Json.csproj +++ b/src/Neuroglia.Data.Schemas.Json/Neuroglia.Data.Schemas.Json.csproj @@ -29,7 +29,7 @@ - + diff --git a/src/Neuroglia.Eventing.CloudEvents.Infrastructure/Neuroglia.Eventing.CloudEvents.Infrastructure.csproj b/src/Neuroglia.Eventing.CloudEvents.Infrastructure/Neuroglia.Eventing.CloudEvents.Infrastructure.csproj index 7e9773589..838e9d119 100644 --- a/src/Neuroglia.Eventing.CloudEvents.Infrastructure/Neuroglia.Eventing.CloudEvents.Infrastructure.csproj +++ b/src/Neuroglia.Eventing.CloudEvents.Infrastructure/Neuroglia.Eventing.CloudEvents.Infrastructure.csproj @@ -30,7 +30,7 @@ - + diff --git a/src/Neuroglia.Plugins/Neuroglia.Plugins.csproj b/src/Neuroglia.Plugins/Neuroglia.Plugins.csproj index 520c5cdde..4942dd3af 100644 --- a/src/Neuroglia.Plugins/Neuroglia.Plugins.csproj +++ b/src/Neuroglia.Plugins/Neuroglia.Plugins.csproj @@ -33,12 +33,12 @@ - + - - + + diff --git a/src/Neuroglia.Serialization.Abstractions/Neuroglia.Serialization.csproj b/src/Neuroglia.Serialization.Abstractions/Neuroglia.Serialization.csproj index 9a310fc2f..104406084 100644 --- a/src/Neuroglia.Serialization.Abstractions/Neuroglia.Serialization.csproj +++ b/src/Neuroglia.Serialization.Abstractions/Neuroglia.Serialization.csproj @@ -31,7 +31,7 @@ - + diff --git a/src/Neuroglia.Serialization.YamlDotNet/Neuroglia.Serialization.YamlDotNet.csproj b/src/Neuroglia.Serialization.YamlDotNet/Neuroglia.Serialization.YamlDotNet.csproj index 7ee9def1c..3863a6f9a 100644 --- a/src/Neuroglia.Serialization.YamlDotNet/Neuroglia.Serialization.YamlDotNet.csproj +++ b/src/Neuroglia.Serialization.YamlDotNet/Neuroglia.Serialization.YamlDotNet.csproj @@ -29,8 +29,8 @@ - - + + diff --git a/src/Neuroglia.Serialization.YamlDotNet/Services/DateTimeOffsetSerializer.cs b/src/Neuroglia.Serialization.YamlDotNet/Services/DateTimeOffsetSerializer.cs index c6448747b..7b65eef98 100644 --- a/src/Neuroglia.Serialization.YamlDotNet/Services/DateTimeOffsetSerializer.cs +++ b/src/Neuroglia.Serialization.YamlDotNet/Services/DateTimeOffsetSerializer.cs @@ -29,7 +29,7 @@ public class DateTimeOffsetSerializer public virtual bool Accepts(Type type) => typeof(DateTimeOffset).IsAssignableFrom(type); /// - public virtual object ReadYaml(IParser parser, Type type) + public virtual object? ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) { Scalar scalar = (Scalar)parser.Current!; parser.MoveNext(); @@ -37,7 +37,7 @@ public virtual object ReadYaml(IParser parser, Type type) } /// - public virtual void WriteYaml(IEmitter emitter, object? value, Type type) + public virtual void WriteYaml(IEmitter emitter, object? value, Type type, ObjectSerializer serializer) { if (value == null || value is not DateTimeOffset dateTime) return; emitter.Emit(new Scalar(dateTime.ToString("o", CultureInfo.InvariantCulture))); diff --git a/src/Neuroglia.Serialization.YamlDotNet/Services/EquatableDictionarySerializer.cs b/src/Neuroglia.Serialization.YamlDotNet/Services/EquatableDictionarySerializer.cs index 7583149a6..3c243005e 100644 --- a/src/Neuroglia.Serialization.YamlDotNet/Services/EquatableDictionarySerializer.cs +++ b/src/Neuroglia.Serialization.YamlDotNet/Services/EquatableDictionarySerializer.cs @@ -31,10 +31,10 @@ public class EquatableDictionarySerializer(Func type.GetGenericType(typeof(EquatableDictionary<,>))?.GetGenericTypeDefinition() == typeof(EquatableDictionary<,>); /// - public virtual object? ReadYaml(IParser parser, Type type) => throw new NotImplementedException(); + public virtual object? ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) => throw new NotImplementedException(); /// - public virtual void WriteYaml(IEmitter emitter, object? value, Type type) + public virtual void WriteYaml(IEmitter emitter, object? value, Type type, ObjectSerializer rootSerializer) { if (value == null) return; var serializer = serializerFactory(); diff --git a/src/Neuroglia.Serialization.YamlDotNet/Services/EquatableListSerializer.cs b/src/Neuroglia.Serialization.YamlDotNet/Services/EquatableListSerializer.cs index 546f90b67..e97513fd8 100644 --- a/src/Neuroglia.Serialization.YamlDotNet/Services/EquatableListSerializer.cs +++ b/src/Neuroglia.Serialization.YamlDotNet/Services/EquatableListSerializer.cs @@ -31,10 +31,10 @@ public class EquatableListSerializer(Func public virtual bool Accepts(Type type) => type.GetGenericType(typeof(EquatableList<>))?.GetGenericTypeDefinition() == typeof(EquatableList<>); /// - public virtual object? ReadYaml(IParser parser, Type type) => throw new NotImplementedException(); + public virtual object? ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) => throw new NotImplementedException(); /// - public virtual void WriteYaml(IEmitter emitter, object? value, Type type) + public virtual void WriteYaml(IEmitter emitter, object? value, Type type, ObjectSerializer rootSerializer) { if (value == null || value is not IEnumerable collection) return; var serializer = serializerFactory(); diff --git a/src/Neuroglia.Serialization.YamlDotNet/Services/JsonNodeTypeConverter.cs b/src/Neuroglia.Serialization.YamlDotNet/Services/JsonNodeTypeConverter.cs index 8f6ec1f42..fc1e4f61b 100644 --- a/src/Neuroglia.Serialization.YamlDotNet/Services/JsonNodeTypeConverter.cs +++ b/src/Neuroglia.Serialization.YamlDotNet/Services/JsonNodeTypeConverter.cs @@ -23,32 +23,24 @@ namespace Neuroglia.Serialization.Yaml; /// /// Represents the used to convert s /// -public class JsonNodeTypeConverter +/// A boolean indicating whether or not to preserve the case of the name of converted properties +public class JsonNodeTypeConverter(bool preservePropertyNameCase = false) : IYamlTypeConverter { - /// - /// Initializes a new - /// - /// A boolean indicating whether or not to preserve the case of the name of converted properties - public JsonNodeTypeConverter(bool preservePropertyNameCase = false) - { - this.PreservePropertyNameCase = preservePropertyNameCase; - } - /// /// Gets a boolean indicating whether or not to preserve the case of the name of converted properties /// - protected bool PreservePropertyNameCase { get; } + protected bool PreservePropertyNameCase { get; } = preservePropertyNameCase; /// public virtual bool Accepts(Type type) => typeof(JsonElement).IsAssignableFrom(type) || typeof(JsonNode).IsAssignableFrom(type); /// - public virtual object? ReadYaml(IParser parser, Type type) => throw new NotSupportedException(); + public virtual object? ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) => throw new NotSupportedException(); /// - public virtual void WriteYaml(IEmitter emitter, object? value, Type type) + public virtual void WriteYaml(IEmitter emitter, object? value, Type type, ObjectSerializer rootSerializer) { if (value is JsonElement jsonElement) value = Json.JsonSerializer.Default.SerializeToNode(jsonElement); this.WriteJsonNode(emitter, value as JsonNode); diff --git a/src/Neuroglia.Serialization.YamlDotNet/Services/JsonObjectDeserializer.cs b/src/Neuroglia.Serialization.YamlDotNet/Services/JsonObjectDeserializer.cs index adf027f22..93f5e991d 100644 --- a/src/Neuroglia.Serialization.YamlDotNet/Services/JsonObjectDeserializer.cs +++ b/src/Neuroglia.Serialization.YamlDotNet/Services/JsonObjectDeserializer.cs @@ -25,7 +25,7 @@ namespace Neuroglia.Serialization.Yaml; /// /// The inner public class JsonObjectDeserializer(INodeDeserializer inner) - : INodeDeserializer + : INodeDeserializer { /// @@ -34,10 +34,10 @@ public class JsonObjectDeserializer(INodeDeserializer inner) protected INodeDeserializer Inner { get; } = inner; /// - public virtual bool Deserialize(IParser reader, Type expectedType, Func nestedObjectDeserializer, out object? value) + public virtual bool Deserialize(IParser reader, Type expectedType, Func nestedObjectDeserializer, out object? value, ObjectDeserializer rootDeserializer) { - if (!typeof(JsonObject).IsAssignableFrom(expectedType)) return this.Inner.Deserialize(reader, expectedType, nestedObjectDeserializer, out value); - if (!this.Inner.Deserialize(reader, typeof(Dictionary), nestedObjectDeserializer, out value)) return false; + if (!typeof(JsonObject).IsAssignableFrom(expectedType)) return this.Inner.Deserialize(reader, expectedType, nestedObjectDeserializer, out value, rootDeserializer); + if (!this.Inner.Deserialize(reader, typeof(Dictionary), nestedObjectDeserializer, out value, rootDeserializer)) return false; value = Json.JsonSerializer.Default.Deserialize(Json.JsonSerializer.Default.SerializeToText(value!)); return true; } diff --git a/src/Neuroglia.Serialization.YamlDotNet/Services/JsonSchemaDeserializer.cs b/src/Neuroglia.Serialization.YamlDotNet/Services/JsonSchemaDeserializer.cs index 165fb1fed..ae32b3ecb 100644 --- a/src/Neuroglia.Serialization.YamlDotNet/Services/JsonSchemaDeserializer.cs +++ b/src/Neuroglia.Serialization.YamlDotNet/Services/JsonSchemaDeserializer.cs @@ -26,7 +26,7 @@ namespace Neuroglia.Serialization.Yaml; /// /// The inner public class JsonSchemaDeserializer(INodeDeserializer inner) - : INodeDeserializer + : INodeDeserializer { /// @@ -35,10 +35,10 @@ public class JsonSchemaDeserializer(INodeDeserializer inner) protected INodeDeserializer Inner { get; } = inner; /// - public virtual bool Deserialize(IParser reader, Type expectedType, Func nestedObjectDeserializer, out object? value) + public virtual bool Deserialize(IParser reader, Type expectedType, Func nestedObjectDeserializer, out object? value, ObjectDeserializer rootDeserializer) { - if (!typeof(JsonSchema).IsAssignableFrom(expectedType)) return this.Inner.Deserialize(reader, expectedType, nestedObjectDeserializer, out value!); - if (!this.Inner.Deserialize(reader, typeof(JsonObject), nestedObjectDeserializer, out value!)) return false; + if (!typeof(JsonSchema).IsAssignableFrom(expectedType)) return this.Inner.Deserialize(reader, expectedType, nestedObjectDeserializer, out value!, rootDeserializer); + if (!this.Inner.Deserialize(reader, typeof(JsonObject), nestedObjectDeserializer, out value!, rootDeserializer)) return false; var jsonObject = (JsonObject)value; var jsonSchema = Json.JsonSerializer.Default.Deserialize(jsonObject)!; value = jsonSchema; diff --git a/src/Neuroglia.Serialization.YamlDotNet/Services/JsonSchemaTypeConverter.cs b/src/Neuroglia.Serialization.YamlDotNet/Services/JsonSchemaTypeConverter.cs index cc1df68f9..390f97ed2 100644 --- a/src/Neuroglia.Serialization.YamlDotNet/Services/JsonSchemaTypeConverter.cs +++ b/src/Neuroglia.Serialization.YamlDotNet/Services/JsonSchemaTypeConverter.cs @@ -29,15 +29,15 @@ public class JsonSchemaTypeConverter public virtual bool Accepts(Type type) => typeof(JsonSchema).IsAssignableFrom(type); /// - public virtual object? ReadYaml(IParser parser, Type type) => throw new NotSupportedException(); + public virtual object? ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) => throw new NotSupportedException(); /// - public virtual void WriteYaml(IEmitter emitter, object? value, Type type) + public virtual void WriteYaml(IEmitter emitter, object? value, Type type, ObjectSerializer rootSerializer) { var schema = value as JsonSchema; if (schema == null) return; var node = Json.JsonSerializer.Default.Deserialize(Json.JsonSerializer.Default.SerializeToText(schema)); - new JsonNodeTypeConverter().WriteYaml(emitter, node, type); + new JsonNodeTypeConverter().WriteYaml(emitter, node, type, rootSerializer); } } diff --git a/src/Neuroglia.Serialization.YamlDotNet/Services/StringEnumDeserializer.cs b/src/Neuroglia.Serialization.YamlDotNet/Services/StringEnumDeserializer.cs index 0227a020b..509c093ec 100644 --- a/src/Neuroglia.Serialization.YamlDotNet/Services/StringEnumDeserializer.cs +++ b/src/Neuroglia.Serialization.YamlDotNet/Services/StringEnumDeserializer.cs @@ -38,10 +38,10 @@ public StringEnumDeserializer(INodeDeserializer inner) protected INodeDeserializer Inner { get; } /// - public virtual bool Deserialize(IParser reader, Type expectedType, Func nestedObjectDeserializer, out object? value) + public virtual bool Deserialize(IParser reader, Type expectedType, Func nestedObjectDeserializer, out object? value, ObjectDeserializer rootDeserializer) { - if (!typeof(Enum).IsAssignableFrom(expectedType)) return this.Inner.Deserialize(reader, expectedType, nestedObjectDeserializer, out value); - if (!this.Inner.Deserialize(reader, typeof(string), nestedObjectDeserializer, out value)) return false; + if (!typeof(Enum).IsAssignableFrom(expectedType)) return this.Inner.Deserialize(reader, expectedType, nestedObjectDeserializer, out value, rootDeserializer); + if (!this.Inner.Deserialize(reader, typeof(string), nestedObjectDeserializer, out value, rootDeserializer)) return false; var valueStr = (string?)value; if (string.IsNullOrWhiteSpace(valueStr)) value = expectedType.GetDefaultValue(); else value = EnumHelper.Parse(valueStr, expectedType); diff --git a/src/Neuroglia.Serialization.YamlDotNet/Services/StringEnumSerializer.cs b/src/Neuroglia.Serialization.YamlDotNet/Services/StringEnumSerializer.cs index 91b385621..f0220b410 100644 --- a/src/Neuroglia.Serialization.YamlDotNet/Services/StringEnumSerializer.cs +++ b/src/Neuroglia.Serialization.YamlDotNet/Services/StringEnumSerializer.cs @@ -28,9 +28,9 @@ public class StringEnumSerializer public virtual bool Accepts(Type type) => type.IsEnum; /// - public virtual object ReadYaml(IParser parser, Type type) => throw new NotImplementedException(); + public virtual object ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) => throw new NotImplementedException(); /// - public virtual void WriteYaml(IEmitter emitter, object? value, Type type) => emitter.Emit(new Scalar(EnumHelper.Stringify((Enum)value!, type))); + public virtual void WriteYaml(IEmitter emitter, object? value, Type type, ObjectSerializer rootSerializer) => emitter.Emit(new Scalar(EnumHelper.Stringify((Enum)value!, type))); } \ No newline at end of file diff --git a/src/Neuroglia.Serialization.YamlDotNet/Services/UriTypeSerializer.cs b/src/Neuroglia.Serialization.YamlDotNet/Services/UriTypeSerializer.cs index e22b4bdd2..8a7d1200c 100644 --- a/src/Neuroglia.Serialization.YamlDotNet/Services/UriTypeSerializer.cs +++ b/src/Neuroglia.Serialization.YamlDotNet/Services/UriTypeSerializer.cs @@ -28,7 +28,7 @@ public class UriTypeSerializer public virtual bool Accepts(Type type) => typeof(Uri).IsAssignableFrom(type); /// - public virtual object ReadYaml(IParser parser, Type type) + public virtual object ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) { var scalar = (Scalar)parser.Current!; parser.MoveNext(); @@ -36,7 +36,7 @@ public virtual object ReadYaml(IParser parser, Type type) } /// - public virtual void WriteYaml(IEmitter emitter, object? value, Type type) + public virtual void WriteYaml(IEmitter emitter, object? value, Type type, ObjectSerializer rootSerializer) { if (value == null) return; emitter.Emit(new Scalar(((Uri)value).OriginalString)); diff --git a/test/Neuroglia.UnitTests/Cases/Data/Infrastructure/EventSourcing/EventStoreTestsBase.cs b/test/Neuroglia.UnitTests/Cases/Data/Infrastructure/EventSourcing/EventStoreTestsBase.cs index 76905fae4..6522a7cb2 100644 --- a/test/Neuroglia.UnitTests/Cases/Data/Infrastructure/EventSourcing/EventStoreTestsBase.cs +++ b/test/Neuroglia.UnitTests/Cases/Data/Infrastructure/EventSourcing/EventStoreTestsBase.cs @@ -11,7 +11,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -using Esprima; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Neuroglia.Data.Infrastructure.EventSourcing; diff --git a/test/Neuroglia.UnitTests/Neuroglia.UnitTests.csproj b/test/Neuroglia.UnitTests/Neuroglia.UnitTests.csproj index f2356bfe9..3dd97d78b 100644 --- a/test/Neuroglia.UnitTests/Neuroglia.UnitTests.csproj +++ b/test/Neuroglia.UnitTests/Neuroglia.UnitTests.csproj @@ -27,11 +27,11 @@ - + - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all